# a "Begins with" IF formula

#### Shales

##### Board Regular
Lets say that I have different letters in A1:A10 and a list of numbers in B1:b10.

I am looking for a formula along the lines of;

If A1:10 = x then C1 = "G", otherwise If B1:B10 starts with an 4 or 5 then C1 = "R", Otherwise C1 = "F"

Can anybody help me. Hope i've explained it ok.

Thanks
Gavin

### Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

#### GettingThere

##### New Member
Hi Gavin,

If I understand correctly - I think this is what you're after:

=IF(LEFT(A1,1)="x","G",IF(OR(LEFT(B1,1)="4",LEFT(B1,1)="5")=TRUE,"R","F"))

I notice that in your formula below you're putting A1:A10 - do you really want to say if any cell in that range? The formula I've put above gives just for that row and you'd copy it down for each row you want to check...

Hope that helps - Give me a shout if you need anything else....

A. =D

#### Shales

##### Board Regular
Thats brilliant, thank you.

Had to amend the forumla a little but thats because I didn't explain it that well.

Thank you very much

Replies
5
Views
293
Replies
6
Views
264
Replies
26
Views
593
Replies
2
Views
253
Replies
2
Views
290

1,195,630
Messages
6,010,780
Members
441,569
Latest member
PeggyLee

### 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.

### Which adblocker are you using?

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

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