Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default how to select the first character in a cell and delete the rest

Hi and thank you in advance
I have a large spreadsheet where they have populated values like 3x3ml,
5x0.5ml etc. They are all pretty different. We only need the first numbers
before the x. How do I do this? Please help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default how to select the first character in a cell and delete the rest

Hi,

Try this

=LEFT(A1,SEARCH("x",A1)-1)+0

Mike

"Helenf" wrote:

Hi and thank you in advance
I have a large spreadsheet where they have populated values like 3x3ml,
5x0.5ml etc. They are all pretty different. We only need the first numbers
before the x. How do I do this? Please help

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default how to select the first character in a cell and delete the rest

Here is another way to get the leading number, assuming the leading numbers
are less than 1000 (increase the 999 if the numbers can be bigger)...

=LOOKUP(999,--LEFT(A1,ROW($1:$99)))

This method will return the leading number even if the character after it is
not an "x".

--
Rick (MVP - Excel)


"Helenf" wrote in message
...
Hi and thank you in advance
I have a large spreadsheet where they have populated values like 3x3ml,
5x0.5ml etc. They are all pretty different. We only need the first numbers
before the x. How do I do this? Please help


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default how to select the first character in a cell and delete the res

Thank you this helped! I noticed further down the spreadsheet that not
everything was 12 x some were 200 pieces etc so this helped great. However
for some reason it returns 1 PACK as 0.542. But thats a simple replace all.
Thanks again

"Rick Rothstein" wrote:

Here is another way to get the leading number, assuming the leading numbers
are less than 1000 (increase the 999 if the numbers can be bigger)...

=LOOKUP(999,--LEFT(A1,ROW($1:$99)))

This method will return the leading number even if the character after it is
not an "x".

--
Rick (MVP - Excel)


"Helenf" wrote in message
...
Hi and thank you in advance
I have a large spreadsheet where they have populated values like 3x3ml,
5x0.5ml etc. They are all pretty different. We only need the first numbers
before the x. How do I do this? Please help



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default how to select the first character in a cell and delete the res

Hmm! It seems to be interpreting that as 1 PM. Try this formula instead...

=LOOKUP(999,--LEFT(SUBSTITUTE(A1," ",""),ROW($1:$99)))

--
Rick (MVP - Excel)


"Helenf" wrote in message
...
Thank you this helped! I noticed further down the spreadsheet that not
everything was 12 x some were 200 pieces etc so this helped great. However
for some reason it returns 1 PACK as 0.542. But thats a simple replace
all.
Thanks again

"Rick Rothstein" wrote:

Here is another way to get the leading number, assuming the leading
numbers
are less than 1000 (increase the 999 if the numbers can be bigger)...

=LOOKUP(999,--LEFT(A1,ROW($1:$99)))

This method will return the leading number even if the character after it
is
not an "x".

--
Rick (MVP - Excel)


"Helenf" wrote in message
...
Hi and thank you in advance
I have a large spreadsheet where they have populated values like 3x3ml,
5x0.5ml etc. They are all pretty different. We only need the first
numbers
before the x. How do I 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
Delete special character Kiannie Excel Discussion (Misc queries) 3 April 2nd 09 11:24 PM
how to keep the first initial of a name &delete the rest in cell mark Excel Discussion (Misc queries) 2 February 28th 07 05:35 PM
Addind cell together with a rest. Rodger Excel Discussion (Misc queries) 7 February 21st 07 01:32 AM
To select cells containing a certain character ? Mark246 Excel Discussion (Misc queries) 5 January 10th 07 09:42 PM
delete unused columns and grey out the rest area random number generator Excel Worksheet Functions 1 March 31st 06 06:32 PM


All times are GMT +1. The time now is 03:52 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"