Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default using =IF function with 12 variables

intent: use 12 variables to get 3 products - 12, or 16, or 24

this formula works

=IF(A4="2 x 6 12 in centers",12,IF(A4="2 x 8 12 in centers",12,
IF(A4="2 x 10 12 in centers",12,IF(A4="2 x 12 12 in centers",12))))

but I have 8 more variables to go ending with ("2 x 12 24 in centers",24)
and the equation is going to be too long.

I tried using the special characters question mark "?" and asterik "*" but
got nowhere.

Any help out there? thank you - Chris, a swell estimator
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default using =IF function with 12 variables

Excel will only allow for a maximum of 7 nested "IFs" in a formula... Not
knowing the full extent of your worksheet from the details presented , you
might try to use a Vlookup table, Column A contains the criteria and Column B
contains the value that you desire, then have you formula look up the desire
value...

Column "A" Column "B"
2 x 6 12 in centers 12
2 x 8 12 in centers 12
2 x 10 12 in centers 12
--

Joe Mac


"swell estimator" wrote:

intent: use 12 variables to get 3 products - 12, or 16, or 24

this formula works

=IF(A4="2 x 6 12 in centers",12,IF(A4="2 x 8 12 in centers",12,
IF(A4="2 x 10 12 in centers",12,IF(A4="2 x 12 12 in centers",12))))

but I have 8 more variables to go ending with ("2 x 12 24 in centers",24)
and the equation is going to be too long.

I tried using the special characters question mark "?" and asterik "*" but
got nowhere.

Any help out there? thank you - Chris, a swell estimator

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default using =IF function with 12 variables

Try this:

=--MID(A4,FIND("in",A4)-3,2)


"swell estimator" wrote:

intent: use 12 variables to get 3 products - 12, or 16, or 24

this formula works

=IF(A4="2 x 6 12 in centers",12,IF(A4="2 x 8 12 in centers",12,
IF(A4="2 x 10 12 in centers",12,IF(A4="2 x 12 12 in centers",12))))

but I have 8 more variables to go ending with ("2 x 12 24 in centers",24)
and the equation is going to be too long.

I tried using the special characters question mark "?" and asterik "*" but
got nowhere.

Any help out there? thank you - Chris, a swell estimator

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default using =IF function with 12 variables

What does the -- do before the MID?
Thanks,
Barb Reinhardt

"Teethless mama" wrote:

Try this:

=--MID(A4,FIND("in",A4)-3,2)


"swell estimator" wrote:

intent: use 12 variables to get 3 products - 12, or 16, or 24

this formula works

=IF(A4="2 x 6 12 in centers",12,IF(A4="2 x 8 12 in centers",12,
IF(A4="2 x 10 12 in centers",12,IF(A4="2 x 12 12 in centers",12))))

but I have 8 more variables to go ending with ("2 x 12 24 in centers",24)
and the equation is going to be too long.

I tried using the special characters question mark "?" and asterik "*" but
got nowhere.

Any help out there? thank you - Chris, a swell estimator

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default using =IF function with 12 variables

On Sep 8, 8:11*am, Barb Reinhardt
wrote:
What does the -- do before the MID?
Thanks,
Barb Reinhardt

"Teethless mama" wrote:
Try this:


=--MID(A4,FIND("in",A4)-3,2)


"swell estimator" wrote:


intent: use 12 variables to get 3 products - 12, or 16, or 24


this formula works


=IF(A4="2 *x 6 *12 in centers",12,IF(A4="2 *x 8 *12 in centers",12,
IF(A4="2 *x 10 12 in centers",12,IF(A4="2 *x 12 12 in centers",12))))


but I have 8 more variables to go ending with ("2 x 12 24 in centers",24)
and the equation is going to be too long.


I tried using the special characters question mark "?" and asterik "*" but
got nowhere.


Any help out there? *thank you - Chris, a swell estimator


OPs formula expressed a desire to return a number (12) not text ("12")
hence the -- operator.

Ken Johnson
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
COUNTIF Function with variables TJ Excel Worksheet Functions 6 September 5th 08 03:16 AM
DDE function with variables Toledo Excel Worksheet Functions 0 November 30th 07 06:12 AM
Lookup function using 2 variables tbar38547 Excel Worksheet Functions 2 April 14th 07 03:54 PM
VBA passing variables through a function Jeff Excel Discussion (Misc queries) 2 November 3rd 05 11:23 PM
Can I use variables in a Range function? André - Brazil Excel Discussion (Misc queries) 2 May 5th 05 10:39 PM


All times are GMT +1. The time now is 02:35 AM.

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

About Us

"It's about Microsoft Excel"