Different range

P

puiuluipui

Hi, i need to modify a little bit this formula :
{=MIN(IF(S5:S24>$E$59,(S5:S24)-$E$59,MAX(S5:S24)))+$E$59}. If i enter a
number in cell "E58" the formula to look in column "S" and if i enter another
number to look in column "T".

If in "E58" is "10.000" than the formula to be identical and to look in
"S5:S24".
{=MIN(IF(S5:S24>$E$59,(S5:S24)-$E$59,MAX(S5:S24)))+$E$59}

If in "E58" is "15.000" than the formula to look in "T5:T24".
{=MIN(IF(T5:T24>$E$59,(T5:T24)-$E$59,MAX(T5:T24)))+$E$59}

Can this be done?
Thanks!
 
E

Eduardo

Hi
=if(E58=10000,{=MIN(IF(S5:S24>$E$59,(S5:S24)-$E$59,MAX(S5:S24)))+$E$59},if(E58=15000,{=MIN(IF(T5:T24>$E$59,(T5:T24)-$E$59,MAX(T5:T24)))+$E$59})

if this helps please click yes, thanks
 
P

puiuluipui

Hi, i cant make your code work. My code is an array code and must be entered
with crtl+shift and enter. That's why i have those brackets. I tried the same
with your code, but is not working. What am i doing wrong?
Thanks!

"Eduardo" a scris:
 
E

Eduardo

Hi,
try

=IF(E58=10000,MIN(IF(S5:S24>$E$59,(S5:S24)-$E$59,MAX(S5:S24)))+$E$59,IF(E58=15000,MIN(IF(T5:T24>$E$59,(T5:T24)-$E$59,MAX(T5:T24)))+$E$59))

press shift+ctrl+enter
 
P

puiuluipui

WORKS GREAT!!
Thanks allot!

"Eduardo" a scris:
Hi,
try

=IF(E58=10000,MIN(IF(S5:S24>$E$59,(S5:S24)-$E$59,MAX(S5:S24)))+$E$59,IF(E58=15000,MIN(IF(T5:T24>$E$59,(T5:T24)-$E$59,MAX(T5:T24)))+$E$59))

press shift+ctrl+enter
 
P

puiuluipui

Hi, can you make this formula work the same way?
=VLOOKUP(E61, U5:U24, 2, FALSE)

If in "E58" is 10.000 than the formula to look in "U5:U24"
If in "E58" is 15.000 than the formula to look in "V5:V24"

"Eduardo" a scris:
 
E

Eduardo

Hi,
=if(e58=10000,VLOOKUP(E61, U5:U24, 2, FALSE),if(e58=15000,VLOOKUP(E61,
v5:v24, 2, FALSE)))
 
P

puiuluipui

Hi, i misstype the code. Sorry. So,...

....can you make this formula work the same way?
=VLOOKUP(E61, U4:V24, 2, FALSE)

If in "E58" is 10.000 than the formula to look in "S4:T24"
If in "E58" is 15.000 than the formula to look in "U4:V24"

Can this work with vlookup?

Thanks!!








"puiuluipui" a scris:
 
E

Eduardo

Hi
=if(e58=10000,VLOOKUP(E61, s5:t24, 2, FALSE),if(e58=15000,VLOOKUP(E61,
u5:v24, 2, FALSE)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top