Hello can someone help me with vba code, let's say I have a sheet with 2 columns. If 1st cell in column A is blank, i want to automatically copy 1st cell in column B and paste it in 1st cell in column A, etc, BUT if cells in column A is NOT blank, i want to keep column A with the current data. DO I even need vba code to do this?
ANY and all help is GREATLY appreciated. tHANKYOU
Here's a non-VBA way:
1) Highlight Column A
2) Select all blank cells (Ctrl-G should get you to the "Go To" box, then click "Special", click "Blanks", and "Okay")
3) All blank cells should be highlighted
4) Type "=" and then arrow to the right of the blank box (so if the first blank box was A1, you would now have "=B1") (don't click with the mouse anywhere otherwise all the blanks will be unselected)
5) Press Ctrl + Enter
6) If done correctly, it'll fill all blank cells with the contents of the adjacent cell in column B
I'm sure someone has a better way, but I have found this useful many times. Hope this works for you.
Following leaves a formula in the previous empty cells.
Hello thanks for the help, sorry but what does this line mean "Following leaves a formula in the previous empty cells." ?
If you look at the cells that were empty before you ran the code, you'll see that there is a formula in it.
All the code does is put a formula in the empty cell.