Totally Lost

deyn

New Member
Joined
Mar 8, 2023
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I would say i'm half decent with Excel but my requirement has get my totally lost.

Basically I'm trying to find the correct formula based on certain text requirement.

For Example :

The requirements in cell N2 needs to be either "Type1", "Type2", "Type3", "Type4"

then if N2 states ;

Type 1, I require a multiply sum P2(value)*Q2(value*0.28*2.2
Type 2, I require a multiply sum P2(value)*Q2(value*0.245*2.2
Type 3, I require a multiply sum P2(value)*Q2(value*0.06*2.2
Type 4, I require a multiply sum P2(value)*Q2(value*0.06*2.2

Any help would be much appreciated please :)
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Excel Formula:
=P2*Q2*LOOKUP(N2,{"Type 1","Type 2","Type 3","Type 4"},{0.28,0.245,0.06,0.06})*2.2
 
Upvote 0
Hi,
You can use all the common elements in your formula and have
Excel Formula:
=CHOOSE(SUBSTITUTE(N2,"Type ",""),0.28,0.245,0.06,0.06)
 
Upvote 0
Excel Formula:
=P2*Q2*LOOKUP(N2,{"Type 1","Type 2","Type 3","Type 4"},{0.28,0.245,0.06,0.06})*2.2
Thank you, this has worked.

What I forgot to add is, it's possible N2 would have alternate text in that doesn't need to have a sum calculated but like a return of "False" if possible please?
 
Upvote 0
Excel Formula:
=IFNA(LOOKUP(...), FALSE)
Or:
Excel Formula:
=IF(ISNA(LOOKUP(N2,{"Type 1","Type 2","Type 3","Type 4"})), FALSE, P2*Q2*LOOKUP(N2,{"Type 1","Type 2","Type 3","Type 4"},{0.28,0.245,0.06,0.06})*2.2)
 
Upvote 0
Welcome to the MrExcel Message Board! :)

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,215,212
Messages
6,123,654
Members
449,113
Latest member
Hochanz

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