Embarrassed to ask this question ....

Bullpen

New Member
Joined
Jul 19, 2011
Messages
48
Hey everyone,

I hate to ask this question because the answer is going to be really easy. I need to separate the direction from a list of addresses. For example, in cell A1 I have 'W Main St', and in cell A2 I have 'First Ave. I need to write a formula in cell B1 that will pull out the 'W' and that in cell B2 it will know that there is no direction (i.e. no N, W, S, E).

How do I write a formula that will tell excel that if the second character in a text string is a space, then return the first character, and if the second character in a text string in NOT a space, then return nothing?

Thanks for your help! Feel free to ask any follow up questions!

John
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hey everyone,

I hate to ask this question because the answer is going to be really easy. I need to separate the direction from a list of addresses. For example, in cell A1 I have 'W Main St', and in cell A2 I have 'First Ave. I need to write a formula in cell B1 that will pull out the 'W' and that in cell B2 it will know that there is no direction (i.e. no N, W, S, E).

How do I write a formula that will tell excel that if the second character in a text string is a space, then return the first character, and if the second character in a text string in NOT a space, then return nothing?

Thanks for your help! Feel free to ask any follow up questions!

John
Maybe something like this...

=IF(MID(A2,2,1)=" ",LEFT(A2),"")
 
Upvote 0
Thank you so much for all of your answers. VOG .. you nailed it!

Thank you again! You guys are incredible!

John
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

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