populating empty cell with value from above

P

PY & Associates

Assuming first date is in row 2
last prod# is in row 15005
no blank rows between prod1 to prod#
then try

Sub t()
for i = 3 to 15005
if range("a" & i)="" then
range("a" & i)=range("a" & i-1)
range("b" & i)=range("b" & i-1)
end if
next i
end sub

"shepshedlad" <[email protected]>
wrote in message
news:[email protected]...
 
S

shepshedlad

Hi,

I have a large worksheet (15000 rows) which contain orders (simplified
as follows)

DATE[/B] *CUSTOMER* PRODUCT
10/10/05 Joe Bloggs Prod1

Prod2

Prod3
11/10/05 Ian Brown Prod1

Prod2

My question, how do I populate the empty cells within the Customer &
Date column so that all products have their respective customer/date
next to them?

Any help would be very greatfully received.

TIA
Rob
 
S

shepshedlad

sorry but the layout has altered in my last post: there are 3 columns
1:Date 2:Customer 3:product

column 1 & 2 are empty when customer places more than one product.

Thanks
Ro
 
G

Gord Dibben

Select entire range then F5>Special>Blanks>OK

Type an = sign in active blank cell then point to cell above and hit CTRL +
ENTER.

Copy>Paste Special(in place)>Values>OK>Esc.


Gord Dibben Excel MVP
 
P

PY & Associates

Interesting

Gord Dibben said:
Select entire range then F5>Special>Blanks>OK

Type an = sign in active blank cell then point to cell above and hit CTRL +
ENTER.

Copy>Paste Special(in place)>Values>OK>Esc.


Gord Dibben Excel MVP
 
Top