Multiplication formula...is this conditional formatting?

mighty mouse

Board Regular
Joined
Mar 17, 2005
Messages
140
Not sure how to enter this formula: If Cell B3 says "P", then Cell B17 is multiplied by .9. If B3 says "Q", then Cell B17 is multiplied by .75, and if B3 is blank, B17 stays the same. Thanks in advance!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
=IF(b3="",1,LOOKUP(b3,{"P","Q"},{0.9,0.75}))*b17

Not sure if by blank you meant nothing or a space. My formula handles the nothing. If you want the space, then change to: b3=" "
Better people on this board should come up with a better way to handle the blank.

Gene, "The Mortgage Man", Klein
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
49,561
Office Version
  1. 365
Platform
  1. Windows
mighty mouse

You could see if this does what you want
=B17*LOOKUP(B3,{0,"P","Q"},{1,0.9,0.75})
 

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
Peter - yours will certainly work if B3 is empty. I'm just not sure if that is
what the OP meant by "blank". Since the OP has not yet answered, lets go with yours since it looks better! (no ifs)

Gene, "The Mortgage Man", Klein
 

Forum statistics

Threads
1,137,335
Messages
5,680,893
Members
419,937
Latest member
Talic

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
Top