Link to home
Create AccountLog in
Avatar of Adam Elsheimer
Adam ElsheimerFlag for Germany

asked on

Formula in Excel or vba to transfer values from Column X to Y

I have to transfer the values in Col E to Col D without overwriting the values in Col D if values exists in cells.

The value = 0 or all empty cells in Col. D should be overwritten by the values from Col. E

Filter, Copy & Paste is a bit difficult if I have 50000 rows.

User generated image
As always thank you for you assistance and effort.

Regards

Adam
Sample.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

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

ASKER

Neeraj, thank you  for your quick and professional response and solution.

Regards,

Adam
You're welcome Adam! Glad I could help.
And thanks for the feedback.
Formula option, in column F:

=IF(AND(D2<>"",D2<>0),D2,E2)

Copy/drag down as far as required and then Copy and paste Values into column D.

Alternative with the screen shot data, copy all of column E data and then do paste Special on column D, choose Values and at the bottom left of the Paste Special window choose Skip Blanks. This will ignore any blank cell from the copied range and will leave the value in column D.

Thanks
Rob H
Thank you Rob. I just noted this fomular for future project. Thanks all of you so much for helping.

Regards,

Adam