Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Counting # of characters before a certain character

Here is my example:

1 - fksdlafjd
2 - dklsafj
3 - lkdfjad
.......
.....
10 - salkjdfjdsl
11 - dklsafjsdj;lfdf

I am trying to grab the beginning # and put it in a different cell. This is
the formula that I am trying: =value(left(cell_ref,??????)). This is not
working for me. Any other ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Counting # of characters before a certain character

Maybe something like this:

=LEFT(A1,FIND(" ",A1)-1)*1

This assumes that the number is always followed by a space and there are no
spaces before the number.

HTH,
Paul

--

"NickPro72" wrote in message
...
Here is my example:

1 - fksdlafjd
2 - dklsafj
3 - lkdfjad
......
....
10 - salkjdfjdsl
11 - dklsafjsdj;lfdf

I am trying to grab the beginning # and put it in a different cell. This
is
the formula that I am trying: =value(left(cell_ref,??????)). This is not
working for me. Any other ideas?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Counting # of characters before a certain character

Try this

=TRIM(LEFT(A1,FIND("-",A1,1)-1))

Drag down.

Mike

"NickPro72" wrote:

Here is my example:

1 - fksdlafjd
2 - dklsafj
3 - lkdfjad
......
....
10 - salkjdfjdsl
11 - dklsafjsdj;lfdf

I am trying to grab the beginning # and put it in a different cell. This is
the formula that I am trying: =value(left(cell_ref,??????)). This is not
working for me. Any other ideas?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Counting # of characters before a certain character

=VALUE(LEFT(A1,FIND("-",A1)-1))
--
John C


"NickPro72" wrote:

Here is my example:

1 - fksdlafjd
2 - dklsafj
3 - lkdfjad
......
....
10 - salkjdfjdsl
11 - dklsafjsdj;lfdf

I am trying to grab the beginning # and put it in a different cell. This is
the formula that I am trying: =value(left(cell_ref,??????)). This is not
working for me. Any other ideas?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Counting # of characters before a certain character

Thank you so much to both of you. That helped out tremendously.

"PCLIVE" wrote:

Maybe something like this:

=LEFT(A1,FIND(" ",A1)-1)*1

This assumes that the number is always followed by a space and there are no
spaces before the number.

HTH,
Paul

--

"NickPro72" wrote in message
...
Here is my example:

1 - fksdlafjd
2 - dklsafj
3 - lkdfjad
......
....
10 - salkjdfjdsl
11 - dklsafjsdj;lfdf

I am trying to grab the beginning # and put it in a different cell. This
is
the formula that I am trying: =value(left(cell_ref,??????)). This is not
working for me. Any other ideas?




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
Extracting characters before or after a specific character Brian Excel Worksheet Functions 4 April 27th 23 07:42 PM
Get characters on left of specified character in Excel Murugan Excel Discussion (Misc queries) 3 April 2nd 23 04:15 PM
Extracting a character from a string of characters Sue Excel Discussion (Misc queries) 6 October 30th 05 01:35 AM
Remove all characters following the first character in a string RC Excel Discussion (Misc queries) 5 August 30th 05 03:17 AM
How can I combine multiple characters into a single character? Yukon Chin Excel Discussion (Misc queries) 4 January 22nd 05 03:29 AM


All times are GMT +1. The time now is 02:53 PM.

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

About Us

"It's about Microsoft Excel"