Getting Text

mrh15

New Member
Joined
Oct 20, 2003
Messages
30
Does anyone know how I can get SURNAME from f(SURNAME,100,,,)
without using macros allowing changes to the number (ie 100) and the lengthof the text (ie SURNAME)

Please Help!!!
 

Some videos you may like

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.

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
kind of ambiguous, don't you think?

w/ exactly what you typed...

=mid(a1,3,7)
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
mrh15 said:
Does anyone know how I can get SURNAME from f(SURNAME,100,,,)
without using macros allowing changes to the number (ie 100) and the lengthof the text (ie SURNAME)

Please Help!!!

Do you mean...

=LEFT(A1,SEARCH(",",A1&",")-1)
 

mrh15

New Member
Joined
Oct 20, 2003
Messages
30
almost but that gives me

f(SURNAME

when all I want is

SURNAME

Thanks
 

Marc

Active Member
Joined
Feb 21, 2002
Messages
388

ADVERTISEMENT

Try:

=MID(A1,3,FIND(",",A1)-3)
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web

ADVERTISEMENT

here...
Book3.xls
ABCD
6f(SURNAME,100,,,)
7SURNAME
Sheet4


now any length, provided the first ( and , are constant.

hth
 

mrh15

New Member
Joined
Oct 20, 2003
Messages
30
Cool mate that works as well but why is it better than Marcs one ?
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
it's not, i was only thinking if the "f" length was variable.

other than that it's identical, but a little more lengthly.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,481
Messages
5,601,918
Members
414,482
Latest member
morkar

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
Top