I want to write the following worksheet function in VBA.
In cell B1 : =IF(OR(A1={1,2,3,4,5,6,7,8,9,0}),"Yes","No")
Is this possible and how to do this?
Thanks.
I want to write the following worksheet function in VBA.
In cell B1 : =IF(OR(A1={1,2,3,4,5,6,7,8,9,0}),"Yes","No")
Is this possible and how to do this?
Thanks.
Last edited by Excelfriend; 01-01-2010 at 12:05 PM.
Please Login or Register to view this content.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
Doesn't this formula do the same without the array
=IF((AND(A1>=0,A1<10)),"Yes","No")
Please Login or Register to view this content.
Last edited by royUK; 01-01-2010 at 07:16 AM.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Thank you MikeRickson for your reply!
That's exactly what I was looking for.
RoyUK,
Thank you too for your reply. Indeed your formula without the array is also good and workable for me.
But MikeRickson's is a more general one, so if I change my formula to let's say:
=IF(OR(A1={3,7,9,14,25,66,101,270,999,1164}),"Yes","No")
then I cannot use your solution.
Nevertheless thanks again!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks