Hi,
I thought the formula below would give me the result of:
7 if I5=1
6 if I5=2
5 if I5=3 and so on but it doesnt seem to work. Can anyone help with where I am going wrong?
=IF(OR(I5={1,2,3,4}),{7,6,5,4})
Hi,
I thought the formula below would give me the result of:
7 if I5=1
6 if I5=2
5 if I5=3 and so on but it doesnt seem to work. Can anyone help with where I am going wrong?
=IF(OR(I5={1,2,3,4}),{7,6,5,4})
Maybe:
=IF(OR(I5={1,2,3,4}),CHOOSE(I5,7,6,5,4),"")
Make Mom proud: Add to my reputation if I helped out!
Make the Moderators happy: Mark the Thread as Solved if your question was answered!
OR only returns a true or false value.
So if I5 is say 3, then it's
=IF(OR(I5={1,2,3,4}),{7,6,5,4})
=IF(TRUE,{7,6,5,4})
At this point, IF doesn't know what to do with the array of values, so it just picks the first value in the array.
Try this instead
=INDEX({7,6,5,4},MATCH(I5,{1,2,3,4},0))
=8-I5 would do it
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
try this one without or
=IF(I5=1,7,IF(I5=2,6,3))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks