JeffFinnan
New Member
- Joined
- Aug 12, 2020
- Messages
- 47
- Office Version
- 2019
- Platform
- Windows
I am trying to find a way to add up numbers in one column if the numbers meet the criterium that a text cell in another column does not start with "-". The cells in the other column could be -TTWO230120C115, SWKS, NYT, -NYT220121C55, etc. I want to count cell that contain SWKS and NYT in another column, but not -TTWO230120C115 and -NYT220121C55.
I tried =SUMIF(C2:C103,"<>-*",I2:I103) and all cells were counted. If I tried =SUMIF(C2:C103,"-*",I2:I103), no cells were counted. If I used =SUMIFS(I2:I103,C2:C103,"-*"), got 0 and if "<>-*" in that formula, got all numbers added.
Now my work around was in a separate column use =IF(LEFT(TRIM(C2),1)="-",0,I2) and copy down and then sum that new column. Is there a way to not have to set up a separate column?
Thanks,
Jeff
I tried =SUMIF(C2:C103,"<>-*",I2:I103) and all cells were counted. If I tried =SUMIF(C2:C103,"-*",I2:I103), no cells were counted. If I used =SUMIFS(I2:I103,C2:C103,"-*"), got 0 and if "<>-*" in that formula, got all numbers added.
Now my work around was in a separate column use =IF(LEFT(TRIM(C2),1)="-",0,I2) and copy down and then sum that new column. Is there a way to not have to set up a separate column?
Thanks,
Jeff