SUMIFS with INDEX and MATCH needs an update.

Ioweyouone

New Member
Joined
Aug 14, 2009
Messages
38
Office Version
  1. 365
Platform
  1. Windows
The formula below is used in a sheet named ‘All Data’ and references another sheet named ‘Jobs Data’.

=SUMIFS(INDEX('JOBS DATA'!E:J,0,MATCH($C$5,'JOBS DATA'!$E$4:$J$4,0)),'JOBS DATA'!A:A,">="&$C$4,'JOBS DATA'!A:A,"<="&EOMONTH($C$4,0),'JOBS DATA'!Q:Q,B7)

The formula works well and returns a number based on the dates in ‘Jobs Data’! A:A, regardless of the word selected in the drop down ‘All Data’! C5.

The NEW objective is to continue using column ‘Jobs Data’! A:A when the word “forecast” is selected in ‘All Data’!C5. I would like to expand the formula so If the user selects “actual” in the C5 dropdown, the formula will then search the dates in column ‘Jobs Data’! K:K , instead of ‘Jobs Data’! A:A. and return the appropriate value. Thanks.

‘All Data’!C4 is the first day of the month.

‘All Data’!C5 is a dropdown cell with a choice of “forecast” or “actual”.

‘Jobs Data’! A:A is a column of dates.

Mr Excel.jpg
Mr excel 3.jpg
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try
Excel Formula:
=SUMIFS(INDEX('JOBS DATA'!E:J,0,MATCH($C$5,'JOBS DATA'!$E$4:$J$4,0)),IF($C$5="Actual",'JOBS DATA'!K:K, 'JOBS DATA'!A:A),">="&$C$4,IF($C$5="Actual",'JOBS DATA'!K:K, 'JOBS DATA'!A:A),"<="&EOMONTH($C$4,0),'JOBS DATA'!Q:Q,B7)
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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