Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pda pda is offline
external usenet poster
 
Posts: 6
Default avoid nested IFs with another function

I have an array comprised of two columns and and 8 rows. The left column
contains an ascending list of numbers -- 91, 181, 366, etc. The right column
contains a corresponding text entry. I want to compare if a value is less
than the number in the left column of the first row. IF the compared value
matches the criteria, pull the text in right column, but if not, move on to
the next row, perform the comparison again to the number in the second row
and either pull the text in the right column or move on to row three, and so
on.

91 AGING
181 MILD
366 MEDIUM
732 SHARP - 1YR
1098 SHARP - 2YR
1464 SHARP - 3YR
1830 SHARP - 4YR
2195 SHARP - 5YR & MORE

Can I avoid nesting IF functions? I will have other items that will have
more than 8 rows.

I hope this question makes sense.

Thanks for helping.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default avoid nested IFs with another function

On Sat, 23 Aug 2008 14:20:01 -0700, pda wrote:

I have an array comprised of two columns and and 8 rows. The left column
contains an ascending list of numbers -- 91, 181, 366, etc. The right column
contains a corresponding text entry. I want to compare if a value is less
than the number in the left column of the first row. IF the compared value
matches the criteria, pull the text in right column, but if not, move on to
the next row, perform the comparison again to the number in the second row
and either pull the text in the right column or move on to row three, and so
on.

91 AGING
181 MILD
366 MEDIUM
732 SHARP - 1YR
1098 SHARP - 2YR
1464 SHARP - 3YR
1830 SHARP - 4YR
2195 SHARP - 5YR & MORE

Can I avoid nesting IF functions? I will have other items that will have
more than 8 rows.

I hope this question makes sense.

Thanks for helping.


Check out the VLOOKUP worksheet function.
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default avoid nested IFs with another function

Are these exact numbers or can there be 101 for instance and you still want
for instance "MILD" returned. If you are looking for an exact match you can
use


=IF(ISNA(VLOOKUP(A1,B1:C20,2,0)),"no match",VLOOKUP(A1,B1:C20,2,0))

if you want that every integer from greater than 91 to 181 will return MILD
than or everything from 0 to 91 will return AGING then you need to change
the table to something like


0 AGING
92 MILD
181 MEDIUM
367 SHARP - 1YR
733 SHARP - 2YR
1099 SHARP - 3YR
1465 SHARP - 4YR
1831 SHARP - 5YR & MORE

and change the formula to

=IF(ISNA(VLOOKUP(A1,B1:C20,2)),"no match",VLOOKUP(A1,B1:C20,2))



--


Regards,


Peo Sjoblom






"pda" wrote in message
...
I have an array comprised of two columns and and 8 rows. The left column
contains an ascending list of numbers -- 91, 181, 366, etc. The right
column
contains a corresponding text entry. I want to compare if a value is less
than the number in the left column of the first row. IF the compared
value
matches the criteria, pull the text in right column, but if not, move on
to
the next row, perform the comparison again to the number in the second row
and either pull the text in the right column or move on to row three, and
so
on.

91 AGING
181 MILD
366 MEDIUM
732 SHARP - 1YR
1098 SHARP - 2YR
1464 SHARP - 3YR
1830 SHARP - 4YR
2195 SHARP - 5YR & MORE

Can I avoid nesting IF functions? I will have other items that will have
more than 8 rows.

I hope this question makes sense.

Thanks for helping.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pda pda is offline
external usenet poster
 
Posts: 6
Default avoid nested IFs with another function

This worked perfectly! Amazing! Thanks!

"Peo Sjoblom" wrote:

Are these exact numbers or can there be 101 for instance and you still want
for instance "MILD" returned. If you are looking for an exact match you can
use


=IF(ISNA(VLOOKUP(A1,B1:C20,2,0)),"no match",VLOOKUP(A1,B1:C20,2,0))

if you want that every integer from greater than 91 to 181 will return MILD
than or everything from 0 to 91 will return AGING then you need to change
the table to something like


0 AGING
92 MILD
181 MEDIUM
367 SHARP - 1YR
733 SHARP - 2YR
1099 SHARP - 3YR
1465 SHARP - 4YR
1831 SHARP - 5YR & MORE

and change the formula to

=IF(ISNA(VLOOKUP(A1,B1:C20,2)),"no match",VLOOKUP(A1,B1:C20,2))



--


Regards,


Peo Sjoblom






"pda" wrote in message
...
I have an array comprised of two columns and and 8 rows. The left column
contains an ascending list of numbers -- 91, 181, 366, etc. The right
column
contains a corresponding text entry. I want to compare if a value is less
than the number in the left column of the first row. IF the compared
value
matches the criteria, pull the text in right column, but if not, move on
to
the next row, perform the comparison again to the number in the second row
and either pull the text in the right column or move on to row three, and
so
on.

91 AGING
181 MILD
366 MEDIUM
732 SHARP - 1YR
1098 SHARP - 2YR
1464 SHARP - 3YR
1830 SHARP - 4YR
2195 SHARP - 5YR & MORE

Can I avoid nesting IF functions? I will have other items that will have
more than 8 rows.

I hope this question makes sense.

Thanks for helping.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 793
Default avoid nested IFs with another function

Enter the following in D1 assuming that the number you want to lookup is in C1
=VLOOKUP(C1,A:B,2,True)

Numbers in column A have to be in ascending order for this to work.

"pda" wrote:

I have an array comprised of two columns and and 8 rows. The left column
contains an ascending list of numbers -- 91, 181, 366, etc. The right column
contains a corresponding text entry. I want to compare if a value is less
than the number in the left column of the first row. IF the compared value
matches the criteria, pull the text in right column, but if not, move on to
the next row, perform the comparison again to the number in the second row
and either pull the text in the right column or move on to row three, and so
on.

91 AGING
181 MILD
366 MEDIUM
732 SHARP - 1YR
1098 SHARP - 2YR
1464 SHARP - 3YR
1830 SHARP - 4YR
2195 SHARP - 5YR & MORE

Can I avoid nesting IF functions? I will have other items that will have
more than 8 rows.

I hope this question makes sense.

Thanks for helping.



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
using sum function,can I avoid calculating hidden rows UB Excel Worksheet Functions 7 January 4th 07 07:15 PM
? avoid changing sum function as rows added? JClark New Users to Excel 4 October 28th 06 08:37 PM
how can avoid considering of blank cells in IF function Lika Excel Worksheet Functions 1 June 12th 06 10:27 AM
How do you avoid duplicates when using the randbetween function? Monica Excel Worksheet Functions 2 February 16th 06 05:45 AM
Avoid geeting function GETPIVOTDATA Gunnar Sandström Excel Discussion (Misc queries) 2 January 18th 06 01:19 PM


All times are GMT +1. The time now is 03:33 AM.

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"