user3580480
user3580480

Reputation: 482

Populate column based on values in another

I have an Excel table as per the below.

|   A   |   B  |
+-------+------+
|  100  |      |
|  #N/A |      | 
|  200  |      |
|  #N/A |      |
|  #N/A |      | 

What I am trying to do, is to populate the values in column B, based on the latest non error value in column A. As per the table below. I am not sure which Excel function to use, so don't have anything I have tried yet.

Desired result

|   A   |  B   |
+-------+------+
|  100  | 100  |
|  #N/A | 100  |
|  200  | 200  |
|  #N/A | 200  |
|  #N/A | 200  |

Any help greatly appreciated.

Upvotes: 0

Views: 48

Answers (1)

Gary's Student
Gary's Student

Reputation: 96753

in B1 enter:

=A1

in B2 enter:

=IF(ISERROR(A2),B1,A2)

and copy downward:

enter image description here

Upvotes: 2

Related Questions