LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default if statements

OK, here is how I would do that (and I would not have been able to set it up
had you not supplied the entire grid).

First, set up a grid someplace on your worksheet and NAME it "grid".

The grid should look like:

2 3 4 5 6 7
2 2/3 2/4 2/5 2/6 2/6
3 3/2 2/2 2/3 2/4 2/5 2/6
4 4/2 3/2 3/3 3/4 3/5 2/5
5 5/2 4/2 4/3 4/4 4/5 3/5
6 6/2 5/2 5/3 5/4 5/5 4/5
7 6/2 6/2 5/2 5/3 5/4 5/5


Note that the numbers representing the contents of Cell_1 and Cell_2 are across
the top and left side; and in the grid are what should be displayed given the
contents of those cells.

To NAME this, after you have entered these values, select the grid; then
Insert/Name/Define and type grid into the box labeled "Names in Workbook".

IMPORTANT: Format the cells as TEXT before entering the values. Otherwise
your 'fractions' will be interpreted as dates.

You can then use this formula to show your displays:

=HLOOKUP(Cell_2,grid,VLOOKUP(Cell_1,grid,1,0),0)

If you get #NA as a result, it is probably due to the contents of either Cell 1
or Cell 2 being TEXT that looks like a number and not a real number. Those
cells should be formatted as General or Number before you make your entries.







On Wed, 26 Oct 2005 17:11:01 -0700, "kdkat"
wrote:

Here is the entire race grid spelled out. Based on Cell 1 and Cell 2 I'd
like the correct text value from Cell 3 displayed. I know it's long and
maybe it's not an IF statement I'm looking for? Trouble is, I don't use
Excel very often, and am completely unaware of what else is out there, or
even how to go about using it. I'm limited to =SUM knowledge - lol

Your help is extremely appreciated.. Kath

If Cell 1 = 2 and Cell 2 = 3 then Cell 3 should display 2/3
If Cell 1 = 2 and Cell 2 = 4 then Cell 3 should display 2/4
If Cell 1 = 2 and Cell 2 = 5 then Cell 3 should display 2/5
If Cell 1 = 2 and Cell 2 = 6 then Cell 3 should display 2/6
If Cell 1 = 2 and Cell 2 = 7 then Cell 3 should display 2/6
If Cell 1 = 3 and Cell 2 = 2 then Cell 3 should display 3/2
If Cell 1 = 3 and Cell 2 = 3 then Cell 3 should display 2/2
If Cell 1 = 3 and Cell 2 = 4 then Cell 3 should display 2/3
If Cell 1 = 3 and Cell 2 = 5 then Cell 3 should display 2/4
If Cell 1 = 3 and Cell 2 = 6 then Cell 3 should display 2/5
If Cell 1 = 3 and Cell 2 = 7 then Cell 3 should display 2/6
If Cell 1 = 4 and Cell 2 = 2 then Cell 3 should display 4/2
If Cell 1 = 4 and Cell 2 = 3 then Cell 3 should display 3/2
If Cell 1 = 4 and Cell 2 = 4 then Cell 3 should display 3/3
If Cell 1 = 4 and Cell 2 = 5 then Cell 3 should display 3/4
If Cell 1 = 4 and Cell 2 = 6 then Cell 3 should display 3/5
If Cell 1 = 4 and Cell 2 = 7 then Cell 3 should display 2/5
If Cell 1 = 5 and Cell 2 = 2 then Cell 3 should display 5/2
If Cell 1 = 5 and Cell 2 = 3 then Cell 3 should display 4/2
If Cell 1 = 5 and Cell 2 = 4 then Cell 3 should display 4/3
If Cell 1 = 5 and Cell 2 = 5 then Cell 3 should display 4/4
If Cell 1 = 5 and Cell 2 = 6 then Cell 3 should display 4/5
If Cell 1 = 5 and Cell 2 = 7 then Cell 3 should display 3/5
If Cell 1 = 6 and Cell 2 = 2 then Cell 3 should display 6/2
If Cell 1 = 6 and Cell 2 = 3 then Cell 3 should display 5/2
If Cell 1 = 6 and Cell 2 = 4 then Cell 3 should display 5/3
If Cell 1 = 6 and Cell 2 = 5 then Cell 3 should display 5/4
If Cell 1 = 6 and Cell 2 = 6 then Cell 3 should display 5/5
If Cell 1 = 6 and Cell 2 = 7 then Cell 3 should display 4/5
If Cell 1 = 7 and Cell 2 = 2 then Cell 3 should display 6/2
If Cell 1 = 7 and Cell 2 = 3 then Cell 3 should display 6/2
If Cell 1 = 7 and Cell 2 = 4 then Cell 3 should display 5/2
If Cell 1 = 7 and Cell 2 = 5 then Cell 3 should display 5/3
If Cell 1 = 7 and Cell 2 = 6 then Cell 3 should display 5/4
If Cell 1 = 7 and Cell 2 = 7 then Cell 3 should display 5/5








"kdkat" wrote:

There is a pre-determined "race grid" that we follow.

"Ron Rosenfeld" wrote:

On Wed, 26 Oct 2005 11:40:03 -0700, "kdkat"
wrote:

Cell 3 does equate to any mathematically figure. the "/" is figurative. It
is strictly text.

Basically I run an amateur pool league. Every player has a handicap # and
based on these #'s depending on who your playing at the time, there is a game
race.

So Cell 1 = Handicap 3 and Cell 2 = Handicap 4 then Cell 3 should display
the game race which in the above example is a 2 to 3 race.

Hope this clarifies, and hope someone can help
Thanks
Katherine

How do you determine that if Cell1=3 and Cell2=4 that it is a 2 to 3 race?


--ron


--ron
 
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 statements Dave in Ampthill New Users to Excel 4 December 11th 08 11:17 AM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
if/and statements BobVA Excel Worksheet Functions 6 May 15th 06 06:02 PM
If statements tdoughty Excel Discussion (Misc queries) 2 December 13th 05 10:09 PM
operator statements, shorting when reusing one of the statements? KR Excel Programming 1 August 4th 05 06:20 PM


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