IF array not working (SOLVED)

phantom1975

MrExcel MVP
Joined
Jun 3, 2002
Messages
3,962
I have the following and it only works for the first condition:

=IF(A1={1,2,3,4,5},{11,22,33,44,55},0)

_________________
The only dumb question is the one that isn't asked. Pass on what you have learned.
This message was edited by phantom1975 on 2002-11-06 18:57
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
On 2002-11-06 18:45, phantom1975 wrote:
I have the following and it only works for the first condition:

=IF(A1={1,2,3,4,5},{11,22,33,44,55},0)

Are you trying to return {11,22,33,44,55} as result, if A1 is equal to one of the values in {1,2,3,4,5} ?
 
Upvote 0
=IF(A1={1,2,3,4,5},{11,22,33,44,55},0)

If A1 = 1, then B1 would equal 11
If A1 = 2, then B1 would equal 22
If A1 = 3, then B1 would equal 33
If A1 = 4, then B1 would equal 44
If A1 = 5, then B1 would equal 55

This is just an example! I know that I could just put =A1*11 in B1. These are just bogus numbers to illustrate what I am trying to do.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top