I assume this would be done with a nested if function, but am asking for advice.
Have large spreadsheet in which I will select a range of numbers to be moved to specific locations.
These numbers fall into 3 major groups and each major group is further divided into two different subroups.
I wish the user to enter into a cell -- sheet 2 A10 for example -- a value -- then once the values are picked the macro will look at this A10 value and then move the numbers to my specifiec location. I am copying below the code for an example of this -- the values are arranged accordingly in the next empty cell everytime control a is hit. My question is -- how can I specify where this location is to be based on the value put in A10?
Thanks for any suggestions and or help with this --
Keyboard Shortcut: Ctrl+a
'
Selection.Copy
Sheets("Sheet2").Select
Columns("A:AV").Select
Selection.ColumnWidth = 12
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A6").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=AVERAGE(R[-5]C:R[-1]C)"
Range("A6").Select
Selection.AutoFill Destination:=Range("A6:C6"), Type:=xlFillDefault
Range("A6:C6").Select
Range("A6").Select
Selection.Copy
Range("A20").Select
'For next cell in the same column (A)
While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Select
Wend
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Clear the clipboard
Application.CutCopyMode = False
Range("B6").Select
Selection.Copy
Range("A30").Select
'For next cell in the same column (A)
While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Select
Wend
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Clear the clipboard
Application.CutCopyMode = False
Range("C6").Select
Selection.Copy
Range("A40").Select
'For next cell in the same column (A)
While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Select
Wend
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Clear the clipboard
Application.CutCopyMode = False
End Sub
Bookmarks