lookup easy one

lars

Board Regular
Joined
Mar 27, 2002
Messages
105
=VLOOKUP(IF(ISNUMBER((E15)*1),(E15)*1,(E15)),pax,12,FALSE)+VLOOKUP(IF(ISNUMBER((E16)*1),(E16)*1,(E16)),pax,12,FALSE)

The formula takes cells E15-E21 just not shown here for simplicity.

What can I add to the formula so if cells 16-21 are blank it won't return a #N/A?

thanks
 
Mark, maybe i misunderstood you previous question but the left most column of the range "PAX" are all voyage numbers i.e. A112
,A113, D112 etc the lookup value range e15-e21 are the possible blank cells.

Hope that makes sense
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
On 2002-04-25 16:28, lars wrote:
Mark, maybe i misunderstood you previous question but the left most column of the range "PAX" are all voyage numbers i.e. A112
,A113, D112 etc the lookup value range e15-e21 are the possible blank cells.

Hope that makes sense

Great! So the value, 0, isn't a valid "voyage number". This allows you to insert a row into the 'PAX' range and setup a value that you'd like your VLOOKUP to return if E15:E21 are blank. You see... when E15:E21 are blank your VLOOKUP function will search for a 0 entry in 'PAX'... so put one there for it to find! Does this make sense? You're configuring your table for all possible lookup values.
 
Upvote 0
Mark, that works, but the range PAX is a download and I was hoping to copy the download in without having to manipulate or change it in anyway. But it works and that is great.

Thanks Mark
Lars
 
Upvote 0
Qroonz, I tried it and it works if I put in the second position but if I add other voayges in the range e16-e21 nothing adds up. it just returns the first voyage find
 
Upvote 0
On 2002-04-25 16:43, lars wrote:
Mark, that works, but the range PAX is a download and I was hoping to copy the download in without having to manipulate or change it in anyway. But it works and that is great.

Thanks Mark
Lars

There are ways around that too. You could use the Data | Get External Data menu command to import your data and have PAX filled in just below a permanent 0 entry on your worksheet.

The important thing (for me at least) is that you're thinking out-of-the-box when you implement a solution such as this. Most users would try to "fix it" by constructing a convoluted formula.
This message was edited by Mark W. on 2002-04-25 16:51
 
Upvote 0
Mark , I take that back it doesn't work if you add other voyages to E16-E21 it only works with E15. hmmmmm....
 
Upvote 0
On 2002-04-25 16:50, lars wrote:
Mark , I take that back it doesn't work if you add other voyages to E16-E21 it only works with E15. hmmmmm....

What value did you associate with 0 in PAX table?
 
Upvote 0
did you change the cell references when you copied the formula?. or are you just repeating the same lookup throughtout all your cells?
 
Upvote 0
I have to go to pick up my daughter

Thanks for the help I will check this out tomorrow morning. Maybe then I can repost and we can have some more fun with it.

Thanks again you guys
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,849
Members
449,051
Latest member
excelquestion515

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