IF Statement Help

forbudt4u

Board Regular
Joined
Jul 22, 2006
Messages
54
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. Mobile
  3. Web
1593534805656.png


Hello, I'm having an issue with a couple IF statements, if that's even what I need to use... I'm hoping someone can help. On the first one, in Cell L4006 I am attempting to have a formula search a range (Status, which is J2:J4004) and give me a count of instances in the range where the text "Missing" is present and give the sum of all of those instances. However, I want it to work after filters are applied counting just the results contained in the fultered results... much like the SUBTOTAL function.

The other formula I will need help with is in Cell M4006 where I will be doing something similar but needing the formula to search a separate range (Cost, which is G2:G4004) and summing up just the costs associated with any cells in the status range containing "Missing". Oh, and just like before, I am needing to adjust results if filters are applied.

I'm hoping I don't need code for this... any help would be greatly appreciated.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
How about:

=SUMPRODUCT(SUBTOTAL(103,OFFSET(J2,ROW(J2:J4004)-ROW(J2),0)),--(J2:J4004="missing"))

and

=SUMPRODUCT(G2:G4004,SUBTOTAL(103,OFFSET(J2,ROW(J2:J4004)-ROW(J2),0)),--(J2:J4004="missing"))
 
Upvote 0
if you could shift the cells down one from the top, you could maybe use AGRRAGATE in the top line and as you apply filters it can ignore hidden etc
 
Upvote 0
How about:

=SUMPRODUCT(SUBTOTAL(103,OFFSET(J2,ROW(J2:J4004)-ROW(J2),0)),--(J2:J4004="missing"))

and

=SUMPRODUCT(G2:G4004,SUBTOTAL(103,OFFSET(J2,ROW(J2:J4004)-ROW(J2),0)),--(J2:J4004="missing"))

This worked flawlessly! Really appreciate it, Eric!
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,525
Members
449,088
Latest member
RandomExceller01

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