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 Breaking out data in a cell

Hi folks,

I download a lot of stats via web queries. One set of stats includes 100 or
so cells in a single column with random data like "74th of 9354" without the
quotes. Can someone help me with a formula to break out the separate numbers
74 & 9354 in the columns to the right, so that I can average those 100 or so
cells?

Thanks for any help you can provide.

Bob


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default Breaking out data in a cell

Howdy,

I reckon you could use

=LEFT(A1,FIND("of",A1)-4)

to get the first set of digits and

=MID(A1,FIND("of",A1)+3,100)

to get the latter chunk, where A1 is the cell with the data you want
to parse.

cheers,
..o.


On Sep 10, 3:43 pm, "Robert Smith"
wrote:
Hi folks,

I download a lot of stats via web queries. One set of stats includes 100 or
so cells in a single column with random data like "74th of 9354" without the
quotes. Can someone help me with a formula to break out the separate numbers
74 & 9354 in the columns to the right, so that I can average those 100 or so
cells?

Thanks for any help you can provide.

Bob



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Breaking out data in a cell

with 74th of 9354 in A1,

=LEFT(SUBSTITUTE(A1,"th of ","?"),FIND("?",SUBSTITUTE(A1,"th of ","?"),1)-1)
displays 74

and
=RIGHT(SUBSTITUTE(A1,"th of ","?"),LEN(SUBSTITUTE(A1,"th of
","?"))-FIND("?",SUBSTITUTE(A1,"th of ","?"),1))
displays 9354
--
Gary''s Student - gsnu2007


"Robert Smith" wrote:

Hi folks,

I download a lot of stats via web queries. One set of stats includes 100 or
so cells in a single column with random data like "74th of 9354" without the
quotes. Can someone help me with a formula to break out the separate numbers
74 & 9354 in the columns to the right, so that I can average those 100 or so
cells?

Thanks for any help you can provide.

Bob



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default Breaking out data in a cell

I think that would work for most numbers but not all - there might be
"st of" or "nd of" or "rd of" cases too.

..o.


On Sep 10, 4:20 pm, Gary''s Student
wrote:
with 74th of 9354 in A1,

=LEFT(SUBSTITUTE(A1,"th of ","?"),FIND("?",SUBSTITUTE(A1,"th of ","?"),1)-1)
displays 74

and
=RIGHT(SUBSTITUTE(A1,"th of ","?"),LEN(SUBSTITUTE(A1,"th of
","?"))-FIND("?",SUBSTITUTE(A1,"th of ","?"),1))
displays 9354
--
Gary''s Student - gsnu2007


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Breaking out data in a cell

your formula fail if it is....

23rd of 9354
or
31st of 9354
or
22nd of 9999
and so on....

"Gary''s Student" wrote:

with 74th of 9354 in A1,

=LEFT(SUBSTITUTE(A1,"th of ","?"),FIND("?",SUBSTITUTE(A1,"th of ","?"),1)-1)
displays 74

and
=RIGHT(SUBSTITUTE(A1,"th of ","?"),LEN(SUBSTITUTE(A1,"th of
","?"))-FIND("?",SUBSTITUTE(A1,"th of ","?"),1))
displays 9354
--
Gary''s Student - gsnu2007


"Robert Smith" wrote:

Hi folks,

I download a lot of stats via web queries. One set of stats includes 100 or
so cells in a single column with random data like "74th of 9354" without the
quotes. Can someone help me with a formula to break out the separate numbers
74 & 9354 in the columns to the right, so that I can average those 100 or so
cells?

Thanks for any help you can provide.

Bob





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Breaking out data in a cell

In B1: =LEFT(A1,FIND(" ",A1)-3)+0
In C1: =MID(A1,FIND("^",SUBSTITUTE(A1," ","^",2))+1,LEN(A1))+0

select B1 to C1 and copy down as far as needed


"Robert Smith" wrote:

Hi folks,

I download a lot of stats via web queries. One set of stats includes 100 or
so cells in a single column with random data like "74th of 9354" without the
quotes. Can someone help me with a formula to break out the separate numbers
74 & 9354 in the columns to the right, so that I can average those 100 or so
cells?

Thanks for any help you can provide.

Bob



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Breaking out data in a cell

I'd like to thank everyone for their reply. I tried the first option by
Omnicron, which showed the numbers correctly, but when doing an average on
those numbers, brought up a big fat 0 for each column.

Teethless mama's formulas renders the correct number via an average formula.

As always folks, thanks for the help.

Bob

"Teethless mama" wrote in message
...
In B1: =LEFT(A1,FIND(" ",A1)-3)+0
In C1: =MID(A1,FIND("^",SUBSTITUTE(A1," ","^",2))+1,LEN(A1))+0

select B1 to C1 and copy down as far as needed


"Robert Smith" wrote:

Hi folks,

I download a lot of stats via web queries. One set of stats includes 100
or
so cells in a single column with random data like "74th of 9354" without
the
quotes. Can someone help me with a formula to break out the separate
numbers
74 & 9354 in the columns to the right, so that I can average those 100 or
so
cells?

Thanks for any help you can provide.

Bob





  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default Breaking out data in a cell

Whups, my bad. The "+0" that Teethless Mama remembered to add to the
end of her formula conveniently converts the value from a string to a
numeric, so that averages and other mathematical functions work.

cheers,
..o.


On Sep 10, 4:36 pm, "Robert Smith"
wrote:
I'd like to thank everyone for their reply. I tried the first option by
Omnicron, which showed the numbers correctly, but when doing an average on
those numbers, brought up a big fat 0 for each column.

Teethless mama's formulas renders the correct number via an average formula.

As always folks, thanks for the help.

Bob


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Breaking out data in a cell

The reason why you got zero from Omnicron's formula is that LEFT and MID
return text strings, so to convert to numbers you need to use a trick like
Teethless mama's +0 (or *1) or otherwise precede the LEFT or MID with a
double unary minus --LEFT(... or --MID(...
--
David Biddulph

"Robert Smith" wrote in message
...
I'd like to thank everyone for their reply. I tried the first option by
Omnicron, which showed the numbers correctly, but when doing an average on
those numbers, brought up a big fat 0 for each column.

Teethless mama's formulas renders the correct number via an average
formula.

As always folks, thanks for the help.

Bob

"Teethless mama" wrote in
message ...
In B1: =LEFT(A1,FIND(" ",A1)-3)+0
In C1: =MID(A1,FIND("^",SUBSTITUTE(A1," ","^",2))+1,LEN(A1))+0

select B1 to C1 and copy down as far as needed


"Robert Smith" wrote:

Hi folks,

I download a lot of stats via web queries. One set of stats includes 100
or
so cells in a single column with random data like "74th of 9354" without
the
quotes. Can someone help me with a formula to break out the separate
numbers
74 & 9354 in the columns to the right, so that I can average those 100
or so
cells?

Thanks for any help you can provide.

Bob







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
Breaking Data into Tabs Vick Excel Discussion (Misc queries) 3 March 20th 07 09:45 PM
Split cell without breaking word? Doug Benjamin Excel Discussion (Misc queries) 8 April 13th 06 01:23 AM
Data Table - Graph Links Breaking!!! Geise, Brad Charts and Charting in Excel 1 March 31st 05 12:34 AM
can't move a named cell without breaking a hyperlink to that cell Snakeye Links and Linking in Excel 3 January 26th 05 11:57 PM
Breaking a Cell Santosh Budalakoti Excel Worksheet Functions 1 December 28th 04 05:58 AM


All times are GMT +1. The time now is 10:34 AM.

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"