Newbie needs more help...

JayZ

New Member
Joined
Apr 1, 2011
Messages
8
Thanks for the help upfront.

Say I want to take a list of numbers and whenever a cell has that number it puts an x in the cell next to it so I know it was contained in my list of numbers.

So, I've tried to use the following, but it doesn't work:

=IF(A3={1,2,13,14,35,36,23,24,3,4,15,16},"X","")

I know I could write:

=IF(A3=1,"X",IF(A3=2,"X", etc ....

But there has to be a better way. Any suggestions are greatly appreciated.

Thanks again,
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
It looks like you are just missing the OR...

=IF(OR(A3={1,2,13,14,35,36,23,24,3,4,15,16}),"X","")
 
Upvote 0
Thanks for the help upfront.

Say I want to take a list of numbers and whenever a cell has that number it puts an x in the cell next to it so I know it was contained in my list of numbers.

So, I've tried to use the following, but it doesn't work:

=IF(A3={1,2,13,14,35,36,23,24,3,4,15,16},"X","")

I know I could write:

=IF(A3=1,"X",IF(A3=2,"X", etc ....

But there has to be a better way. Any suggestions are greatly appreciated.

Thanks again,
Here's another one...

=IF(COUNT(MATCH(A3,{1,2,3,4,13,14,15,16,23,24,35,36},0)),"X","")

That's slightly more efficient than the IF(OR(... version.

If you create a defined name:
  • Name: Array
  • Refers to: ={1,2,3,4,13,14,15,16,23,24,35,36}
Then:

=IF(COUNT(MATCH(A3,Array,0)),"X","")
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,282
Members
452,902
Latest member
Knuddeluff

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