If statement using And, Value, Left, Functions, Number Ranges

hgufrin

Board Regular
Joined
Apr 19, 2004
Messages
177
Office Version
  1. 365
Platform
  1. Windows
Hello -

I sure would appreciate if someone could help me combine the following two formulas into one nested formula. They work individually but I simply am not able to successfully combine them.

=IF(AND(VALUE(LEFT(A2,5))>=61761,VALUE(LEFT(A2,5))<=61769),"Yes","no")
=+IF((LEFT(A2,4)="6170"),"Yes","No")

If a cell begins with 6170, return "Yes"

Or

If the left 5 characters of a cell begin with 61761 but are less than or equal to 61769, return "Yes".

Please note - the cell may contain letters such as 61761F which is why I put the "Value" function in there.

Thanks so much for your help.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
How about
Excel Formula:
=IF(OR(LEFT(A2,4)="6170",AND(VALUE(LEFT(A2,5))>=61761,VALUE(LEFT(A2,5))<=61769)),"Yes","no")
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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