Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default right, mid, left functions??

I have a column with STATE & CITY information i.e. A1= VIRGINIA BEACH VA,
A2=YAKIMA WA, A3=RENO NV, etc. I'm able to extract the STATE digits using the
'right' function; however, I can't do the same for the CITY information due
to the different lenghts. Is there a formula to do this?
Please help.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default right, mid, left functions??

Hi,

Try this

=TRIM(LEFT(A1,LEN(A1)-2))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"syl_usmc" wrote:

I have a column with STATE & CITY information i.e. A1= VIRGINIA BEACH VA,
A2=YAKIMA WA, A3=RENO NV, etc. I'm able to extract the STATE digits using the
'right' function; however, I can't do the same for the CITY information due
to the different lenghts. Is there a formula to do this?
Please help.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default right, mid, left functions??

If you want to remove the last 3 characters (space & state), then try
=LEFT(A1,LEN(A1)-3)
--
David Biddulph

"syl_usmc" wrote in message
...
I have a column with STATE & CITY information i.e. A1= VIRGINIA BEACH VA,
A2=YAKIMA WA, A3=RENO NV, etc. I'm able to extract the STATE digits using
the
'right' function; however, I can't do the same for the CITY information
due
to the different lenghts. Is there a formula to do this?
Please help.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default right, mid, left functions??

Try this...

A1 = VIRGINIA BEACH VA

B1 = extracted state:

=RIGHT(A1,2)

To extract the city:

=SUBSTITUTE(A1," "&B1,"")

--
Biff
Microsoft Excel MVP


"syl_usmc" wrote in message
...
I have a column with STATE & CITY information i.e. A1= VIRGINIA BEACH VA,
A2=YAKIMA WA, A3=RENO NV, etc. I'm able to extract the STATE digits using
the
'right' function; however, I can't do the same for the CITY information
due
to the different lenghts. Is there a formula to do this?
Please help.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default right, mid, left functions??

Mike,
Your're awsome! Thx so much

Syl

"Mike H" wrote:

Hi,

Try this

=TRIM(LEFT(A1,LEN(A1)-2))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"syl_usmc" wrote:

I have a column with STATE & CITY information i.e. A1= VIRGINIA BEACH VA,
A2=YAKIMA WA, A3=RENO NV, etc. I'm able to extract the STATE digits using the
'right' function; however, I can't do the same for the CITY information due
to the different lenghts. Is there a formula to do this?
Please help.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
left and right functions hshayhorn Excel Worksheet Functions 4 July 30th 08 08:16 PM
Using MID/LEFT functions to customize data Shams Excel Discussion (Misc queries) 4 November 2nd 07 07:47 PM
Using Left/Mid functions to format download Shams Excel Worksheet Functions 2 November 2nd 07 06:27 PM
LEFT / RIGHT functions Kevin G Excel Worksheet Functions 3 April 6th 06 11:01 PM
LEFT, MID functions? Lindsey M Excel Worksheet Functions 6 March 16th 05 08:44 PM


All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"