a "Begins with" IF formula

Shales

Board Regular
Joined
Aug 8, 2006
Messages
171
Office Version
  1. 365
Platform
  1. Windows
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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,835
Members
449,051
Latest member
excelquestion515

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