Help with a formula

paulsolar

Well-known Member
Joined
Aug 21, 2013
Messages
680
Office Version
  1. 365
Hi All

I'm looking to combine 2 formula rather than having to use 2 cells to obtain the answer.

In cell D4 I have =LEFT(C4,2)
In cell E4 I have =IF(ISNUMBER(RIGHT(D4,1)),D4,LEFT(D4,1))

This is being used convert a full post code to just the opening letters, for example a post code be B12 3TT or for a different area it could be BA12 3TT, I just want either B or BA

I've tried all sorts to get it to work in one cell and abviously doing something wrong.

there is probably a lot more elegant way of doing this but I'll be blowed if I can find it

Any help would be greatly appreciated


Cheers

Paul
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi Mark

yours work brilliantly as well, spoilt for choice now:)

Cheers

Paul

Hi Paul!

I'm happy that your problem was solved. This is the most important thing.

And thank you for the feedback.

By the way, here is another option (not so fast, but that works):

=LEFT(C4,AGGREGATE(15,6,FIND(ROW($1:$10)-1,C4),1)-1)

Markmzz
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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