Formula help

Repoort

New Member
Joined
Oct 20, 2017
Messages
25
Ok I am not sure this will go where I want it to but I am going to try this. I am new to excel and can not figure out this formula, if it is possible. I am trying....

if k20=2 then "22,400"
if h23="" then "36,000"
if h23=8 then "38,000"
if h23=9 then "39,000"
if h23 >= 10 then "22,400 each"

By using &if I have been able to get it all to work except the k20=2 value I want. When it does equal 2 it places the 22,400 and the 36,000 from h23="". For reference when k20=2 there will not be anything in h23.

i am trying to put put this into j23 and am hoping for a formula as I am not familiar with the macro. Any help is appreciated
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Welcome to the board.

Perhaps this:

=IF(K20=2,"22,400",IF(H23="","36,000",IF(H23=8,"38,000",IF(H23=9,"39,000","22,400 each"))))

This will result in 36,000 when both cells are blank, or K20 = anything other than 2, and H23 is blank. So, if a 0 is accidentally entered into K20 and H23 is blank, then it will return 36,000.
 
Upvote 0
Thank you so much for that formula. Is there anyway that it would stay 36000 if there were a number less that 8 entered in h23? Other than that it works great. If that is only issue then i will work with it?
 
Upvote 0
I would do this with a small lookup table and 2 IF statements
[Table="width:, class:grid"][tr][td] [/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][/tr]
[tr][td]
2​
[/td][td][/td][td]
36000​
[/td][td][/td][td][/td][/tr]

[tr][td]
3​
[/td][td]
8​
[/td][td]
38000​
[/td][td][/td][td]
38000​
[/td][/tr]

[tr][td]
4​
[/td][td]
9​
[/td][td]
39000​
[/td][td][/td][td][/td][/tr]

[tr][td]
5​
[/td][td]
100​
[/td][td]
22400​
[/td][td][/td][td][/td][/tr]
[/table]

D3=IF(K20=2,22400,IF(H23<8,36000,VLOOKUP(H23,$A$2:$B$5,2,1)))

Note that if you are referring t actual values, don't put the numbers inside "" as it makes them text
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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