Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default If, multiple arguments

Hi, i need an code with 12 arguments.

=IF(A1<H1,H1,IF(A1<H2,H2,IF(A1<H3,H3,IF(A1<H4,H4,I F(A1<H5,H5,IF(A1<H6,H6,IF(A1<H7,H7,IF(A1<H8,H8)))) ))))

This code is not working with more than 8 arguments, and i need 12.
I tried =choose, but still not working.
Any ideea?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default If, multiple arguments

Without seeing your data, not sure if this will work perfectly, but you could
do something like:
=LOOKUP(A1+1,H1:H8)

The +1 is only in there because your arguements were less than (not less
than or equal). I'm also assuming the values in H1:H8 are at least more than
1 apart from each other.
--
Best Regards,

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


"puiuluipui" wrote:

Hi, i need an code with 12 arguments.

=IF(A1<H1,H1,IF(A1<H2,H2,IF(A1<H3,H3,IF(A1<H4,H4,I F(A1<H5,H5,IF(A1<H6,H6,IF(A1<H7,H7,IF(A1<H8,H8)))) ))))

This code is not working with more than 8 arguments, and i need 12.
I tried =choose, but still not working.
Any ideea?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default If, multiple arguments

Hi,
H1=10000
H2=20000
H3=30000
....
....
H12=120000

let's say that A1=1250
1250 is smaller than 10000.i need the code to look in H1:H12 and in B1 the
code to display 8750, and in C1 to display 10000.
if A1=48000, result to be: B1=2000 and C1=50000

in C column i need a formula that retrieve the closes data from H column and
in B column the "same code"-A1





"Luke M" a scris:

Without seeing your data, not sure if this will work perfectly, but you could
do something like:
=LOOKUP(A1+1,H1:H8)

The +1 is only in there because your arguements were less than (not less
than or equal). I'm also assuming the values in H1:H8 are at least more than
1 apart from each other.
--
Best Regards,

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


"puiuluipui" wrote:

Hi, i need an code with 12 arguments.

=IF(A1<H1,H1,IF(A1<H2,H2,IF(A1<H3,H3,IF(A1<H4,H4,I F(A1<H5,H5,IF(A1<H6,H6,IF(A1<H7,H7,IF(A1<H8,H8)))) ))))

This code is not working with more than 8 arguments, and i need 12.
I tried =choose, but still not working.
Any ideea?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default If, multiple arguments

Use the array formula:

=MIN(IF(H1:H12$A$1,(H1:H12)-$A$1,MAX(H1:H12)))+$A$1

Array formulas are entered with "CTRL + SHIFT + ENTER"

See : http://www.cpearson.com/excel/ArrayFormulas.aspx


"puiuluipui" wrote:

Hi, i need an code with 12 arguments.

=IF(A1<H1,H1,IF(A1<H2,H2,IF(A1<H3,H3,IF(A1<H4,H4,I F(A1<H5,H5,IF(A1<H6,H6,IF(A1<H7,H7,IF(A1<H8,H8)))) ))))

This code is not working with more than 8 arguments, and i need 12.
I tried =choose, but still not working.
Any ideea?

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default If, multiple arguments

HI, WORKS GREAT!!

Thanks allot!



"dhstein" a scris:

Use the array formula:

=MIN(IF(H1:H12$A$1,(H1:H12)-$A$1,MAX(H1:H12)))+$A$1

Array formulas are entered with "CTRL + SHIFT + ENTER"

See : http://www.cpearson.com/excel/ArrayFormulas.aspx


"puiuluipui" wrote:

Hi, i need an code with 12 arguments.

=IF(A1<H1,H1,IF(A1<H2,H2,IF(A1<H3,H3,IF(A1<H4,H4,I F(A1<H5,H5,IF(A1<H6,H6,IF(A1<H7,H7,IF(A1<H8,H8)))) ))))

This code is not working with more than 8 arguments, and i need 12.
I tried =choose, but still not working.
Any ideea?

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 multiple arguments [email protected] Excel Worksheet Functions 2 March 18th 08 09:19 PM
Multiple Arguments ijt Excel Discussion (Misc queries) 3 November 20th 06 06:48 AM
sum with multiple arguments hotelmasters Excel Worksheet Functions 2 August 23rd 06 07:10 PM
Multiple Arguments dansargeant Excel Worksheet Functions 3 March 10th 06 08:06 AM
how do I count with multiple arguments Chris G Excel Worksheet Functions 1 February 1st 06 05:45 PM


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