Formula Question

TMILJVIPM

Board Regular
Joined
Aug 6, 2011
Messages
72
Guys I need some help with a formula. Here is what im trying to do:

Cell K1 to subtotal cells F8:F234 but I only want it to sum the cells when I8:I234 have "R" in them

here's what I tried: =subtotal(9,F8:F234),countif(I8:I234,"R")

But this did not work
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Guys I need some help with a formula. Here is what im trying to do:

Cell K1 to subtotal cells F8:F234 but I only want it to sum the cells when I8:I234 have "R" in them

here's what I tried: =subtotal(9,F8:F234),countif(I8:I234,"R")

But this did not work

Try...

=SUMPRODUCT( SUBTOTAL(9,OFFSET(F8, ROW(F8:F234)-ROW(F8),,1)), --(I8:I234="R"))
 
Last edited:
Upvote 0
Good night!

try this...

=sumproduct((I8:234="R")*(F8:234)).
 
Upvote 0
Try the following:

=SUMPRODUCT(--ISNUMBER(FIND("R",I8:I234)),--
(F8:F234))

Be sure to enter it using Ctrl+Shift+Enter if done correctly { these brackets should appear around your formula}

If you need to sum upper and lower case r - this should work - again use Ctrl+Shift+Enter

=SUMPRODUCT(--ISNUMBER(FIND("R",A1:A3)),--
(B1:B3))+SUMPRODUCT(--ISNUMBER(FIND("r",A1:A3)),--
(B1:B3))

Cheers, :)
 
Upvote 0
Oops, ignore the second formula above(it will add columns with both an upper and lower case R twice).
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,555
Members
452,928
Latest member
101blockchains

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