CHECK WITHIN FORMULA

PM1

Board Regular
Joined
Oct 28, 2005
Messages
192
In the formula below (which works fine) I want to add a condition.

Col H consists of letters P & C, when it finds a P it sums up the "C"'s until the next instance of P.

Now I want to add into the column 2 more letters K & A, so I want the formula to stop summing when it reaches these characters until the next instance of P.


IF(H2="P",IF(ISNUMBER(MATCH("P",H3:$H$3972,0)),SUM(L2:INDEX(L2:$L$3972,MATCH("P",H3:$H$3972,0))),SUM(L2:$L$3972)),"")/F2
Purch Orders BP²I.xls
FGHIJKL
261,266.00P2,217WindowsNTServers7,596.00
36157.00C WindowsNTServers942.00
4662.00C WindowsNTServers372.00
512174.00C WindowsNTServers2,088.00
66133.00C WindowsNTServers798.00
76169.00C WindowsNTServers1,014.00
8644.00C WindowsNTServers264.00
9635.00C WindowsNTServers210.00
10115.00C WindowsNTServers15.00
1116,365.00P13,555WindowsNTServers6,365.00
1222,641.00C WindowsNTServers5,282.00
132159.00C WindowsNTServers318.00
142230.00C WindowsNTServers460.00
15144.00C WindowsNTServers44.00
163235.00C WindowsNTServers705.00
171331.00C WindowsNTServers331.00
18135.00C WindowsNTServers35.00
19115.00C WindowsNTServers15.00
20138,960.64P38,961Networks38,960.64
Assets
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Is this what you mean?

=IF(H2="P",IF(ISNUMBER(MATCH(TRUE,INDEX(ISNUMBER(MATCH(H3:$H$3972,{"A","K","P"},0)),0),0)),SUM(L2:INDEX(L2:$L$3972,MATCH(TRUE,INDEX(ISNUMBER(MATCH(H3:$H$3972,{"A","K","P"},0)),0),0)))/F2,SUM(L2:$L$3972)/F2),"")
 
Upvote 0

Forum statistics

Threads
1,215,030
Messages
6,122,762
Members
449,095
Latest member
m_smith_solihull

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