Forum Discussion

Alex159's avatar
Alex159
Copper Contributor
Oct 15, 2019

Formula Format Settings

Hi All, 

 

I have encountered and issue with the settings of my formulas I use for work around data manipulation.

 

When using VLOOKUPS and COUNTIFS the table or range in which the formula looks up or counts a value against shifts down as I apply the formula to the below cells. Meaning:  

=COUNTIFS(Sheet3!I2:I133,B2,Sheet3!V2:V133,B2)

Sheet3!I2:I133 = the first range I look the value of B2 against 

Sheet3!V2:V133 = the range I will count how many times B2 shows in this range 

 

When formula is applied to the cells below as I have more than one row of data to count, this happens;

=COUNTIFS(Sheet3!I2:I133,B2,Sheet3!V2:V133,B2)

=COUNTIFS(Sheet3!I3:I134,B3,Sheet3!V3:V134,B3)

=COUNTIFS(Sheet3!I2:I133,B4,Sheet3!V2:V133,B4)

This means that both ranges (tables) are shifting down as its applied, therefore when you get to row 10, the formula excludes the first 9 values in the second range....Ultimately giving an inaccurate count...The B value is the only figure to increase

 

Same issue applies when using VLOOKUPS.... the table it searches its value against shifts down, therefore excluding values.. 

 

How can this be fixed?....

 

4 Replies

  • Twifoo's avatar
    Twifoo
    Silver Contributor

    Alex159 

    When you are copying down rows, lock the row references of your range by preceding them with dollar ($) signs, like this: 

    =COUNTIFS(Sheet3!I$2:I$133,B2,Sheet3!V$2:V$133,B2)

  • PascalKTeam's avatar
    PascalKTeam
    Iron Contributor
    Looks like you should use an absolute reference. Let's assume that this formula Sheet3!I2:I133 should always start at I2, even if you copy it a down a couple of rows you have to make row 2 an absolute reference by adding $ to the formula like this: Sheet3!I$2:I133
    • Alex159's avatar
      Alex159
      Copper Contributor

      Awesome thanks for the advice, any reason why this could be happening and not to other members of my team?

      • PascalKTeam's avatar
        PascalKTeam
        Iron Contributor
        Since this is standard excel behaviour it should be the same for all users

Resources