Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 192
Default How to handle this logic test

GS wrote:

Oops! got the args switched around for the lookup.
See correction below...

Another suggestion, to obviate need for nested IFs...

Store all possible criteria in a local scope named range with their
respective return values, then use a lookup function.

Example:

DefinedName: "Sheet1!RetVals"
RefersTo: $A$1:$C$2

Layout:
X | Y | Z
This | That | Other

DefinedName: "Criteria"
RefersTo: $A3 (with B3 selected so it's col-absolute, row-relative)

You can hide these 2 rows so your data can be setup normal.
Optionally, you could use 2 cols (A:B).

Criteria in colA, return values in colB with this formula...


=HLOOKUP(Criteria,RetVals,2,False)


Now you can have however many Criteria/RetVal pairs as you like all
working with 1 simple formula.<g



Thanks Gary, I'll try that flexible method at next opportunity.

--
Terry, East Grinstead, UK
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
MORE THAN ONE LOGIC TEST jan kay Excel Worksheet Functions 3 February 5th 06 01:41 AM
logic test toolman Excel Discussion (Misc queries) 2 October 8th 05 01:37 PM
logic test toolman New Users to Excel 1 October 8th 05 05:19 AM
logic test toolman Excel Worksheet Functions 2 October 8th 05 04:28 AM
Logic test Ajit Excel Programming 1 October 13th 04 09:11 PM


All times are GMT +1. The time now is 04:34 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"