Link to home
Create AccountLog in
Avatar of Student1234
Student1234

asked on

formula that deletes itself and leaves a value....

such as,

=if( a1="","",'paste value of a1'no more formula)

could i vba a function and [if,false= my macro paste.value] this  cell or some other cell?
Avatar of redmondb
redmondb
Flag of Afghanistan image

Hi, Student1234.

UDF's are deliberately limited in what they can do. However, this could be done with an Event macro. Interested?

Regards,
Brian.
Avatar of Student1234
Student1234

ASKER

yes
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
thanks.

could you help me with this bit of vba.

Private Sub Worksheet_Change(ByVal Target As Excel.range)
'when entering data in a cell in Col M
On Error GoTo enditall
Application.EnableEvents = False
 Application.Calculation = xlCalculationManual
 
If Target.Cells.Column = 13 Then
With Target
.Offset(0, -3).Select
'moves to col J in same row
Selection.Copy
.Offset(0, 31).Select
'moves to col AR
.Value = ActiveCell.PasteSpecial.PasteValues


End With
End If

enditall:
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Sub
'Need something to return to the original selected cell in  the row to col m and down one giving the appears of a normal entry.
What do you want us to do about it? Is this part of the same question or is it a new question?
i will post a new question it is different
Thanks