Hi!
I desperately need some help with some excel macros, can anybody help please?
I need the VBA code so that an excel macros will run once automatically when, for example cell A4 = 1.
I've managed to get this far with the VBA:
Sub copytohere()
If ThisWorkbook.Sheets("Sheet1").Range("A4").Value = "1" Then
Range("A1").Select
Selection.Copy
Range("E1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
Selection.ClearContents
End If
End Sub
I dont think I've got it quite right though...
Can anyone help please?
This macros is basic - all it does is copy data from cell A1 to E1 and then deletes A1.
I was hoping the IF statement would make the macros run once automatically when cell A4 = 1 however when I enter 1 into cell A4 nothing happens.
What is interesting is that if i then go to run the macros manually, it will perform the macros correctly if cell A4 = 1 .If cell A4 doesn't equal 1 and I run the macros manually, nothing happens.
I need the VBA so that the macros will run once automatically when cell A4 equals 1.
Any help is much appreciated -Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you!
Paddy
I desperately need some help with some excel macros, can anybody help please?
I need the VBA code so that an excel macros will run once automatically when, for example cell A4 = 1.
I've managed to get this far with the VBA:
Sub copytohere()
If ThisWorkbook.Sheets("Sheet1").Range("A4").Value = "1" Then
Range("A1").Select
Selection.Copy
Range("E1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
Selection.ClearContents
End If
End Sub
I dont think I've got it quite right though...
Can anyone help please?

This macros is basic - all it does is copy data from cell A1 to E1 and then deletes A1.
I was hoping the IF statement would make the macros run once automatically when cell A4 = 1 however when I enter 1 into cell A4 nothing happens.
What is interesting is that if i then go to run the macros manually, it will perform the macros correctly if cell A4 = 1 .If cell A4 doesn't equal 1 and I run the macros manually, nothing happens.
I need the VBA so that the macros will run once automatically when cell A4 equals 1.
Any help is much appreciated -Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you!
Paddy