Multiple Ifs (ranges?)

BioPA

New Member
Joined
Oct 26, 2013
Messages
30
Hello again!

I m trying to solve it, but ...

I have a table with 4 columns and 22 rows:

[TABLE="width: 500"]
<tbody>[TR]
[TD]From[/TD]
[TD]To[/TD]
[TD]Statement1[/TD]
[TD]Statement2[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]0.19[/TD]
[TD]3-5[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.20[/TD]
[TD]0.30[/TD]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]....[/TD]
[TD]....[/TD]
[TD]...[/TD]
[TD]....[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]5[/TD]
[TD]1[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]

I would like an if (vlookup maybe) statement as below

If D1 ( a cell outside this table, where a user would insert a number) is between 0 -0.19,then ''statement1 & statement2'', else if D1 is between 0.20-0.30m, then ''statement1&statement2'',...else if D1 is between 4-5 then ''statement1&statement2''

There must be a combination of vlookup/match, i assume!

Finally, please inform me which of the MrExcel's books is the most useful for this kind of formulas? Any recommendations would be appreciated.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
[TABLE="width: 295"]
<colgroup><col><col><col span="2"></colgroup><tbody>[TR]
[TD]From[/TD]
[TD]To[/TD]
[TD]Statement1[/TD]
[TD]Statement2[/TD]
[/TR]
[TR]
[TD="align: right"]0[/TD]
[TD="align: right"]0.19[/TD]
[TD]3-5[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD="align: right"]0.2[/TD]
[TD="align: right"]0.3[/TD]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]....[/TD]
[TD]....[/TD]
[TD]...[/TD]
[TD]....[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD]1[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Value[/TD]
[TD]Result[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]0.25[/TD]
[TD]4 3[/TD]
[TD][/TD]
[TD]

[/TD]
[/TR]
</tbody>[/TABLE]

What you need is just a VLOOKUP and &
In B8
=VLOOKUP(A8,$A$2:$D$5,3)&" " & VLOOKUP(A8,$A$2:$D$5,4)
where A8 holds the lookup value, A2:D5 holds the data. (Note, Column A needs to be sorted in ascending order)
 
Upvote 0

Forum statistics

Threads
1,223,382
Messages
6,171,771
Members
452,422
Latest member
rlynchbro

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