Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default If statement with lookup array... any advice?

I am trying to automate a spreadsheet. The basic formula is this... Any
suggestions or corrections would be appreciated.
=if(Logical_test, lookup_array, lookup_array)

actual formula

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),LOOKUP(B56,{3800,5300, 6200,8700,13500,17000,21000,26000,33000},{"X12B39" ,'X15B39","X18B39","X22B39","X24B43","X27B47","X30 B55","X33B55","X27B71"}))

I have also tried

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),if(b3="Top
Mount",LOOKUP(B56,{3800,5300,6200,8700,13500,17000 ,21000,26000,33000},{"X12B39",'X15B39","X18B39","X 22B39","X24B43","X27B47","X30B55","X33B55","X27B71 "}))"")

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default If statement with lookup array... any advice?

You had a single quotation (in front of X15B39) in the last half of formula
that was screwing things up.

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),LOOKUP(B56,{3800,5300, 6200,8700,13500,17000,21000,26000,33000},{"X12B39" ,"X15B39","X18B39","X22B39","X24B43","X27B47","X30 B55","X33B55","X27B71"}))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"DanH" wrote:

I am trying to automate a spreadsheet. The basic formula is this... Any
suggestions or corrections would be appreciated.
=if(Logical_test, lookup_array, lookup_array)

actual formula

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),LOOKUP(B56,{3800,5300, 6200,8700,13500,17000,21000,26000,33000},{"X12B39" ,'X15B39","X18B39","X22B39","X24B43","X27B47","X30 B55","X33B55","X27B71"}))

I have also tried

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),if(b3="Top
Mount",LOOKUP(B56,{3800,5300,6200,8700,13500,17000 ,21000,26000,33000},{"X12B39",'X15B39","X18B39","X 22B39","X24B43","X27B47","X30B55","X33B55","X27B71 "}))"")

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default If statement with lookup array... any advice?

Thanks... I think I've been stairing at the screen for too long. I had two
other people look at this. I had asked them to verify that all my quots were
there and parenthesis were there but nothing. Good eye.

Thanks again.

"Luke M" wrote:

You had a single quotation (in front of X15B39) in the last half of formula
that was screwing things up.

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),LOOKUP(B56,{3800,5300, 6200,8700,13500,17000,21000,26000,33000},{"X12B39" ,"X15B39","X18B39","X22B39","X24B43","X27B47","X30 B55","X33B55","X27B71"}))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"DanH" wrote:

I am trying to automate a spreadsheet. The basic formula is this... Any
suggestions or corrections would be appreciated.
=if(Logical_test, lookup_array, lookup_array)

actual formula

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),LOOKUP(B56,{3800,5300, 6200,8700,13500,17000,21000,26000,33000},{"X12B39" ,'X15B39","X18B39","X22B39","X24B43","X27B47","X30 B55","X33B55","X27B71"}))

I have also tried

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),if(b3="Top
Mount",LOOKUP(B56,{3800,5300,6200,8700,13500,17000 ,21000,26000,33000},{"X12B39",'X15B39","X18B39","X 22B39","X24B43","X27B47","X30B55","X33B55","X27B71 "}))"")

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default If statement with lookup array... any advice?

You could greatly reduce the length of your formula if you were to setup a
lookup table.

With this data in the range D1:E11 -

2050.128
3250.158
5150.188
8500.228
1150.248
15400.278
18250.308
22500.338
26000.368
31000.408
41000.408

With this data in the range G1:H9 -

3800.X12B39
5300.X15B39
6200.X18B39
8700.X22B39
13500.X24B43
17000.X27B47
21000.X30B55
26000.X33B55
33000.X27B71

Then your formula becomes:

=VLOOKUP(B56,IF(B3="Back Mount",D1:E11,G1:H9),2)

--
Biff
Microsoft Excel MVP


"DanH" wrote in message
...
I am trying to automate a spreadsheet. The basic formula is this... Any
suggestions or corrections would be appreciated.
=if(Logical_test, lookup_array, lookup_array)

actual formula

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),LOOKUP(B56,{3800,5300, 6200,8700,13500,17000,21000,26000,33000},{"X12B39" ,'X15B39","X18B39","X22B39","X24B43","X27B47","X30 B55","X33B55","X27B71"}))

I have also tried

=IF(B3="Back
Mount",LOOKUP(B56,{2050,3250,5150,8500,1150,15400, 18250,22500,26000,31000,41000},{128,158,188,228,24 8,278,308,338,368,408,408}),if(b3="Top
Mount",LOOKUP(B56,{3800,5300,6200,8700,13500,17000 ,21000,26000,33000},{"X12B39",'X15B39","X18B39","X 22B39","X24B43","X27B47","X30B55","X33B55","X27B71 "}))"")

Thanks.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If Statement / Array JEFF Excel Worksheet Functions 6 October 29th 08 03:28 AM
IF statement with 2 array formulae nathan_savidge Excel Worksheet Functions 1 April 22nd 08 02:47 PM
Array, Formula, Constant, IF Statement Question???? SayWhatAuto Excel Discussion (Misc queries) 4 January 1st 07 09:36 PM
IF statement in Array Formula's sdg8481 Excel Discussion (Misc queries) 7 July 24th 06 12:49 PM
Array If statement doesn't work Suzanne Excel Worksheet Functions 5 December 3rd 04 09:19 AM


All times are GMT +1. The time now is 12:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"