SOLVED

Indexing or Referencing the next cell above with value

Copper Contributor

Hi,

I'm wondering if there's a function or method to reference the first cell up in a column that has a value with an unknown number of rows? I can manually do it with using INDIRECT or OFFSET but this requires nesting multiple IF functions to address the unknown number of rows. Table below is a simplified example of what I'm trying to accomplish.

 

Column B has values with seemingly random row spacing between. Column A needs to reference the value in Column B's "section". The Column B variables could be alphanumeric.

 

=FORMULATEXT(Column_A)Column_AColumn_B 
=[@[Column B]]1.01.0
=INDIRECT(ADDRESS(ROW()-1,COLUMN()+1))1.0 
=[@[Column B]]2.1.12.1.1
=INDIRECT(ADDRESS(ROW()-1,COLUMN()+1))2.1.1 
=INDIRECT(ADDRESS(ROW()-2,COLUMN()+1))2.1.1 
=[@[Column B]]3.13.1
=INDIRECT(ADDRESS(ROW()-1,COLUMN()+1))3.1 
=INDIRECT(ADDRESS(ROW()-2,COLUMN()+1))3.1 
=INDIRECT(ADDRESS(ROW()-3,COLUMN()+1))3.1 
=[@[Column B]]4.3.24.3.2
=INDIRECT(ADDRESS(ROW()-1,COLUMN()+1))4.3.2 
=INDIRECT(ADDRESS(ROW()-2,COLUMN()+1))4.3.2 
=INDIRECT(ADDRESS(ROW()-3,COLUMN()+1))4.3.2 
=INDIRECT(ADDRESS(ROW()-4,COLUMN()+1))4.3.2 
=INDIRECT(ADDRESS(ROW()-5,COLUMN()+1))4.3.2 
=INDIRECT(ADDRESS(ROW()-6,COLUMN()+1))4.3.2 
=[@[Column B]]5.05.0
=INDIRECT(ADDRESS(ROW()-1,COLUMN()+1))5.0 

 

Thanks!

Guan

2 Replies
best response confirmed by Guan_Kwok (Copper Contributor)
Solution

@Guan_Kwok 

=IF(B2="",C1,B2)

You can try this formula.

if.JPG 

That worked perfectly! Thank you!!
1 best response

Accepted Solutions
best response confirmed by Guan_Kwok (Copper Contributor)
Solution

@Guan_Kwok 

=IF(B2="",C1,B2)

You can try this formula.

if.JPG 

View solution in original post