Avatar of Adam Elsheimer
Adam Elsheimer
Flag 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.

Screen
As always thank you for you assistance and effort.

Regards

Adam
Sample.xlsx
Microsoft ExcelVBAVB ScriptMicrosoft Office

Avatar of undefined
Last Comment
Adam Elsheimer

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Subodh Tiwari (Neeraj)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Adam Elsheimer

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

Regards,

Adam
Subodh Tiwari (Neeraj)

You're welcome Adam! Glad I could help.
And thanks for the feedback.
Rob Henson

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
Your help has saved me hundreds of hours of internet surfing.
fblack61
Adam Elsheimer

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

Regards,

Adam