We help IT Professionals succeed at work.

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

260 Views
Last Modified: 2017-03-17
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
Comment
Watch Question

Excel & VBA Expert
CERTIFIED EXPERT
Most Valuable Expert 2018
Awarded 2015
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

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

Regards,

Adam
Subodh Tiwari (Neeraj)Excel & VBA Expert
CERTIFIED EXPERT
Most Valuable Expert 2018
Awarded 2015

Commented:
You're welcome Adam! Glad I could help.
And thanks for the feedback.
Rob HensonFinance Analyst
CERTIFIED EXPERT

Commented:
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

Author

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

Regards,

Adam

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions