Complex Formula Help

easybpw

Active Member
Joined
Sep 30, 2003
Messages
437
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Hello,

Thank you in advance for your help. I have a complex formula issue, at least for me it is. I need a formula that has the following conditions:

I need to count the number of times a word shows in column D but only if column E says "NEW" or "RET". Then I need to take that result and if falls within a range (1-3, 4-5, 6-7, 8-9, and 10 and above) take that and have it relate to a dollar amount.

So for example if the result from column d is 4 or 5 then the dollar amount would be $7,500. If it falls within 6 - 7 then the dollars would be $8,000 and so on. How can this be accomplished with a formula. I prefer to not add columns if I don't have to. I've tried different things but I'm stumped.

Thanks again!

Bill
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi,

May be something like this.
As you didn't provide the full details, the Criterion, Lookup Vector, and Result Vector may need adjusting:


Book1
DEFG
2WordNew8500
3WordRet
4WordOld
5WordRet
6WordOther
7WordRet
8New
9WordOld
10WordNew
11WordNew
12Ret
13WordRet
14WordNew
15WordOld
Sheet89
Cell Formulas
RangeFormula
G2=LOOKUP(SUM(COUNTIFS(D2:D15,"Word",E2:E15,{"New","Ret"})),{0,4,6,8,10},{0,7500,8000,8500,9000})
 
Last edited:
Upvote 0
That looks awesome. I'll try it out and let you know if it doesn't work. Thanks! I wouldn't have figured that out myself. Much appreciated!
 
Upvote 0
Hello, are you looking to do something like this:

=IFERROR(LOOKUP(COUNTIFS($D$1:$D$11,"word",$E$1:$E$11,"new")+COUNTIFS($D$1:$D$11,"word",$E$1:$E$11,"ret"),{0,4,6,8,10},{5000,6000,7500,8000,10000}),0)

Correct Lookup vector per above
 
Last edited:
Upvote 0
Hello, are you looking to do something like this:

=IFERROR(LOOKUP(COUNTIFS($D$1:$D$11,"word",$E$1:$E$11,"new")+COUNTIFS($D$1:$D$11,"word",$E$1:$E$11,"ret"),{0,4,6,8,10},{5000,6000,7500,8000,10000}),0)

Correct Lookup vector per above

Did not correct the results vector to match or should the lookup vector be "{1,4,6,8,10}?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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