Loop Through Blank Cells and Populate with Value Above

marka87uk

Board Regular
Joined
Mar 24, 2007
Messages
247
Hi,

I need to loop through the selected range (e.g. A8:E10000) and if a cell is blank then it's formula needs to equal the cell above it (i.e. if A10 is blank then it's formula should be =A9).

Please can you point me in the right direction?

Many thanks. :)
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Highlight the range A8:A10000
Press CTRL + G
Click Special
Select Blanks
Click OK
Press =
Press UP Arrow
Press CTRL + ENTER


If this must be done in a macro, use the macro recorder to record yourself doing the above steps.

Hope that helps.
 
Upvote 0

James006

Well-known Member
Joined
Apr 4, 2009
Messages
4,750
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Is there a specific need for a macro ?

F5 Special Blanks
equal above cell
control enter

HTH



P.S. oops ... JohnMo1 went a lot faster ... :)
 
Upvote 0

Forum statistics

Threads
1,195,858
Messages
6,011,980
Members
441,661
Latest member
Pammie007

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
Top