List with empty spaces

zorans

New Member
Joined
Nov 14, 2003
Messages
32
Hi
I have list
A1=Peter
A2=0
A3=0
A4=John
A5=0
A6=0
A7=0
A8=0
A9=George

I want to B column looks like:
B1=Peter
B2=Peter
B3=Peter
B4=John
B5=John
B6=John
B7=John
B8=John
B9=George

Can anyone help?

Best regards
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Jon von der Heyden

MrExcel MVP, Moderator
Joined
Apr 6, 2004
Messages
10,803
Office Version
  1. 365
Platform
  1. Windows
Hi,

In B1: =A1
In B2: =IF(A2=0,B1,A2) copied down to end of range.

Regards,
Jon
 

Watch MrExcel Video

Forum statistics

Threads
1,112,880
Messages
5,543,007
Members
410,583
Latest member
gazz57
Top