Formula to Fill down the blank cells in a row with the data in the cell just above in Excel

In an Excel file I have a row, in which some of them have the value 0 in it. What I want is to include the data in the first cell to the blank cell below until a row with data appear.

Example:

I want to include transaction type to all the lines in the data. In a case where we have a large number of data it is easier to use formula.

Step 1: Create a new column adjacent to the Transaction Type column.

consider that we are creating the new column in C. So C1 will belong to the heading. C2 contains the first data.

Step 2: In cell adjacent to the cell having the transaction type, enter the formula ” =B2 “.

Step 3: Navigate to the next cell down. Enter the formula ” =IF(B3=0, C2, B3) “.

This formula means that, it will check the cell left to it (in column B), compares the value in it. If it is 0, then the value in the top cell will be copied to the current cell, else it will copy the value from the left cell to the current cell.

Step 4: Apply the formula into the entire column.

Result:

Leave a comment

Your email address will not be published. Required fields are marked *