I think it's fine I would prefer PM the Excel file directly. Thank you!
Posts by icedsnowflake
-
-
HI,
I am new to the world of macros, and have tried to find information on resolving my macro issue however am unable to do so despite referring to various threads in this forum and on other sites. I was wondering if I could get the following looped (as I have 162 rows in total to go through)?
This is the first row + first column:
Range("B31:E31").Select -> This is the range that I want to get the percentages from, e.g. 35%, 25%, 35%, 5%
Sheets("SAA Testing").Select
Range("L8").Select
ActiveCell.FormulaR1C1 = "35%"
Range("M8").Select
ActiveCell.FormulaR1C1 = "25%"
Range("O8").Select
ActiveCell.FormulaR1C1 = "35%"
Range("P8").Select
ActiveCell.FormulaR1C1 = "5%"
Range("B3:I3").Select
Selection.Copy
Sheets("Testing").Select
Range("G31").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
This is for the first row + second column:
Sheets("SAA Testing").Select
Range("B3:I3").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Testing").Select
Range("P31").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
And this is for the second row + first column:
Range("B32:E32").Select
Sheets("SAA Testing").Select
Range("L8").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "35%"
Range("M8").Select
ActiveCell.FormulaR1C1 = "25%"
Range("O8").Select
ActiveCell.FormulaR1C1 = "10%"
Range("P8").Select
ActiveCell.FormulaR1C1 = "30%"
Range("B3:I3").Select
Selection.Copy
Sheets("Testing").Select
Range("G32").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
This is for the second row + second column:Sheets("SAA Testing").Select
Range("B3:I3").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Testing").Select
Range("P32").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Essentially I was wondering if there is a way for me to extract the data from the rows e.g. for third row + first column it would be
1. From B33:E33 to get the % I need
2. Go to the SAA Testing sheet to key in the % in L8, M8, O8 and P8
3. Select Selection
4. Copy the values generated in the SAA Testing sheet from B3:I3
5. Paste special in the Testing sheet (which would be G33:N33)
For the second column:
6. Go back to the SAA Testing sheet and Select Selection
7. Copy the values generated in the SAA Testing sheet from B3:I3
8. Paste special in the Testing sheet (which would be P33:W33)
Please let me know if you need more information, I hope my explanation provides clarity else please let me know.
Thanks a lot!