Result in one cell based on value in another cell

Marq

Well-known Member
Joined
Dec 13, 2004
Messages
914
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Using Excel 2007:

I'm needing two formulas in cell's O3 and P3 that basically says:

If the value in cell E3 is 4555 or 4556 then in this cell (O3) show YES

in the other cell (P3):

If the value in B3 begins with a number 6, then in this CELL show up as YES.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Try this formula in E3:
Code:
=IF(OR(E3=4555, E3=4556),"YES")
Though you don't state what happens in E3 if it doesn't show either value

For P3 try:
Code:
=IF(LEFT(B3,1)=6,"YES")
Again you don't state what happens if the first character is not a 6

For any IF statement, always better to consider the two options if your condition matches or your condition doesn't match
 
Upvote 0
Using Excel 2007:

I'm needing two formulas in cell's O3 and P3 that basically says:

If the value in cell E3 is 4555 or 4556 then in this cell (O3) show YES

in the other cell (P3):

If the value in B3 begins with a number 6, then in this CELL show up as YES.
Try these...

For O3:

=IF(OR(E3={4555,4556}),"Yes","")

For P3:

=IF(LEFT(B3)="6","Yes","")
 
Upvote 0
try this
Excel Workbook
OP
3YesYes
Sheet1
Excel 2003
Cell Formulas
RangeFormula
O3=IF(OR(E3=4555,E3=4556),"Yes","")
P3=IF(LEFT(TEXT(B3,"00"),1)="6","Yes","")
 
Upvote 0
For P3 try:

=IF(LEFT(B3,1)=6,"YES")
Since the LEFT function returns a TEXT value LEFT(B3,1)=6 will NEVER be TRUE.

You have to either quote the 6 or coerce the result of LEFT.

It'd be easier and more robust to quote the 6:

=IF(LEFT(B3,1)="6","YES")
 
Upvote 0
I left out the second part of the equation..sorry about that...this is what im needing:

I'm needing two formulas in cell's O3 and P3 that basically says:

If the value in cell E3 is 4555 or 4556 then in this cell (O3) show YES, but if the value in E3 is 7555 or 7556 then show NO

in the other cell (P3):

If the value in B3 begins with a number 6, then in this CELL (P3) show up as YES...or if the value in B3 begins with a 9 then show NO in the cell (P3)
 
Upvote 0
I left out the second part of the equation..sorry about that...this is what im needing:

I'm needing two formulas in cell's O3 and P3 that basically says:

If the value in cell E3 is 4555 or 4556 then in this cell (O3) show YES, but if the value in E3 is 7555 or 7556 then show NO

in the other cell (P3):

If the value in B3 begins with a number 6, then in this CELL (P3) show up as YES...or if the value in B3 begins with a 9 then show NO in the cell (P3)

O3:

=IF(OR(E3=4555,E3=4556),"Yes","No")

P3:

=IF(LEFT(B3)="6","Yes",IF(LEFT(B3)="9","No",""))
 
Upvote 0
I left out the second part of the equation..sorry about that...this is what im needing:

I'm needing two formulas in cell's O3 and P3 that basically says:

If the value in cell E3 is 4555 or 4556 then in this cell (O3) show YES, but if the value in E3 is 7555 or 7556 then show NO

in the other cell (P3):

If the value in B3 begins with a number 6, then in this CELL (P3) show up as YES...or if the value in B3 begins with a 9 then show NO in the cell (P3)
For O3:

=IF(OR(E3={4555,4556}),"Yes",IF(OR(E3={7555,7556}),"No",""))

For P3:

=IF(LEFT(B3)="6","Yes",IF(LEFT(B3)="9","No",""))
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,629
Members
452,933
Latest member
patv

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