I am trying to create an IF function that will do the following:
If A2 is equal to > 1 or contains a "P" enter the number 3 in A1, otherwise A1 is left blank
Any assistance is appreciated
I am trying to create an IF function that will do the following:
If A2 is equal to > 1 or contains a "P" enter the number 3 in A1, otherwise A1 is left blank
Any assistance is appreciated
Last edited by marktwark; 08-26-2011 at 11:19 AM.
![]()
Please Login or Register to view this content.
If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...
Thomas Lafferty
Analyst/Programmer
In cell A1 try:
=if(or(A2>1,A2=1,A2="P"),3,"")
I have assumed that you you meant A2=1 or A2>1 by your request.
Alan
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Actually, if there is a date or the letter P in A2, I want A1 to display the number 3, otherwise A1 would be blank.
Dates in Excel are whole numbers between 1 and 2958465 (1/1/1901 and 12/31/9999). What's the earliest date you will accept as being valid?
I wish I would have stated the issue more carefully. I know how dates count but what I want more specifically is IF H113 is any date or contains the letter P then G113 will display a 3 (which will be counted in another formula) IF H113 contains the letter E or S then G113 will be a null value.
I would really appreciate any input. Thanks...... Mark
What would you like the output to be if neither of those criteria are met?
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
Hi,
I get that but what should be the outcome in G113 if the value in H113 matches neither of those criteria?
Please also don't quote whole posts when replying.
Dom
Try this: =IF(OR(H113>1,H113="P"),3,IF(OR(H113="E",H113="S"),"","Neither criteria met"))
Dom
The value in G113 should be nothing if there is an S or an E in H113. I appreciate your time...... Mark
This formula populates a 3 in G113. That's my biggest obstacle.
=IF(OR(AND(ISNUMBER(H113),H113>1),H113="P"),3,IF(OR(H113="E",H113="S"),"","Neither criteria met"))
Dom
That's it! Thank you very much. The project is done!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks