Search code examples
excelreferencecell

If Cell is blank, reference the left cell


Image for reference:

enter image description here

If the cell on the right (B1) is blank, I want it to use the data in the left cell (A1).

I have tried:

=IF(ISBLANK(B1), A1, B1)

However, this only results in an error.

=IF(ISBLANK(B1), A1, "")

This results in a 0.


Solution

  • Without VBA: Circular reference problem. If you want to check that if B column has data then no need to paste the column A data..And if column b is blank then you want the column A data to paste in column B , right? If that's the scenario then you need to open iterative analysis..For this Go to File>Options>Formula>Enable iterative analysis.