VBA - copy cell if it is not empty

Kristina96

New Member
Joined
Sep 30, 2019
Messages
33
Hi everyone,

I have the following problem:

I have a small table with 2 columns (E and F):
I want to copy all values from column F into column E but only if there is a value in column F. I cannot use the "normal" copy function as that would copy empty cells. There are values in column E that are supposed to be kept if there is no value in column F.
All of this should be done with VBA as it is part of a macro.
I am very thankful for every idea or help!
Thank you and regards
Kristina
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You're welcome, glad to help, & thanks for the feedback.:)
 
Upvote 0
That makes sense but it is still not copying the values. The macro is running without error but nothing changes...
That's odd, it worked just fine for me.
I have a feeling that there may be some minor detail that you are leaving out, not realizing that it may be affecting something.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,215
Members
453,024
Latest member
Wingit77

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top