A more elegant countifs criteria than "$B6-$B5/1<0" across 50 columns

tekram

New Member
Joined
Nov 26, 2023
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
In economic conditions, the 50 US states each has a state by state economic activity. The percent change each month can be an indication of a coming recession.

So there are 50 columns that needed to be summed across each month (row) and we need to know how many states are going into a percent change < 0. This can be shown possibly as;

Excel Formula:
=SUM(COUNTIFS(B6:I6,{

"$B6-$B5/1<0","$C6-$C5/1<0","$D6-$D5/1<0","$E6-$E5/1<0","$F6-$F5/1<0","$G6-$G5/1<0","$H6-$H5/1<0","$I6-$I5/1<0",

}))

only the first 8 states shown.

So is there a way to sum this number each month in a formula without typing up all 50 absolute cell references?

Thank you from an Excel novice.
 

Attachments

  • EXCEL_or6gH314iX.png
    EXCEL_or6gH314iX.png
    44.2 KB · Views: 32

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Assum 50 states are from colum B to AY

this count states with value in row 6 smaller than row 5:

Code:
=SUMPRODUCT(--(B6:AY6<B5:AY5))
 
Upvote 0
Solution
Welcome to the Forum!

Something like this perhaps:

ABCDEFG
1ALAKAZARCANo down
21-Sep100105103110106
31-Oct991041021111054
41-Nov1011061011091072
5
Sheet1
Cell Formulas
RangeFormula
G3:G4G3=SUMPRODUCT(--(B3:F3<B2:F2))
 
Upvote 0
Thank you both.

For some reason, countifs was the first formula that came up when I searched, not realizing there are other simpler and better solutions.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top