Eduardo Serrano
Eduardo Serrano

Reputation: 97

When I add a new row to an excel table it changes the range of my previous cells formula

I'm making a table to generate product SKUs, and I am using a table so that it expands the formula automatically but whenever i add a new row the previous rows formula changes to the same range as the new one.

=VLOOKUP([@Categoria],Table1,2,FALSE)&TEXT(COUNTIF($D$2:D5,[@Categoria]),"00000")

if that formula was on cell D5 and I add a new row D5 range would change to count until D6, If I add an aditional cell both D5 and D6 range would change to count until D7 and so on.

Upvotes: 1

Views: 930

Answers (1)

Eduardo Serrano
Eduardo Serrano

Reputation: 97

Got it to work by making the following change

=+VLOOKUP(D4,Table1,2,FALSE)& TEXT(COUNTIF($D$2:INDEX(D:D,ROW( )),D4),"00000")

Upvotes: 1

Related Questions