Hi All,
I have an issue with vba code that im trying to write where I want to only copy cells of a certain value over into another column on the same sheet.
I need my code to loop through cells in column A, find all cells with a value greater or less than zero and paste those cells into column B in the same worksheet. The paste should not overwrite any values in column B that already contain values. I also want the code to select the entire column every time for both procedures
So far I have been experimenting with a piece of code I modified for another task but not sure sure how to adapt it with the IF statement in this case;
Seems like every task I'm currently doing in VBA requires me to ask new questions as the requirements are never the same, hence I'll always ask weird and wonderful questions.
I would be greatly appreciative of any help re: the above
Many thanks,
Jeevz
I have an issue with vba code that im trying to write where I want to only copy cells of a certain value over into another column on the same sheet.
I need my code to loop through cells in column A, find all cells with a value greater or less than zero and paste those cells into column B in the same worksheet. The paste should not overwrite any values in column B that already contain values. I also want the code to select the entire column every time for both procedures
So far I have been experimenting with a piece of code I modified for another task but not sure sure how to adapt it with the IF statement in this case;
VBA Code:
Sub Copy_P123()
Range("Z12").Select 'Column A selection
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("BL12").Select 'Column B paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Seems like every task I'm currently doing in VBA requires me to ask new questions as the requirements are never the same, hence I'll always ask weird and wonderful questions.
I would be greatly appreciative of any help re: the above
Many thanks,
Jeevz