Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 90
Default Removing numbers to the left

Hey,

I have a column of cells that contain either 1,2,3 or 4 numbers listed as so:

1
1,3
1,3,8
4,5,6,7

What I want is for a cell to look at the numbers and give me the 2 largest
numbers. If there is only 1 number, then it can return just that one number.


Thanks.
matt

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Removing numbers to the left

The easiest way to do this is in two steps:

1. Separate your data into cells by using Text to Columns
2. Get the two largest numbers using the Large function.

Post back if you need more help on either. Also tell us what version of
Excel you are using.

Regards,
Fred.

"mpenkala" wrote in message
...
Hey,

I have a column of cells that contain either 1,2,3 or 4 numbers listed as
so:

1
1,3
1,3,8
4,5,6,7

What I want is for a cell to look at the numbers and give me the 2 largest
numbers. If there is only 1 number, then it can return just that one
number.


Thanks.
matt


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 90
Default Removing numbers to the left

Hi Fred,
spliting the data with text to columns doesn't work because the numbers are
deterined using a formula. So when I go to use text to columns, it attempts
to break up the formula instead of the numbers given.

Any other ideas? Thanks,
Matt


"Fred Smith" wrote:

The easiest way to do this is in two steps:

1. Separate your data into cells by using Text to Columns
2. Get the two largest numbers using the Large function.

Post back if you need more help on either. Also tell us what version of
Excel you are using.

Regards,
Fred.

"mpenkala" wrote in message
...
Hey,

I have a column of cells that contain either 1,2,3 or 4 numbers listed as
so:

1
1,3
1,3,8
4,5,6,7

What I want is for a cell to look at the numbers and give me the 2 largest
numbers. If there is only 1 number, then it can return just that one
number.


Thanks.
matt



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Removing numbers to the left

On Wed, 16 Apr 2008 15:41:02 -0700, mpenkala
wrote:

Hey,

I have a column of cells that contain either 1,2,3 or 4 numbers listed as so:

1
1,3
1,3,8
4,5,6,7

What I want is for a cell to look at the numbers and give me the 2 largest
numbers. If there is only 1 number, then it can return just that one number.


Thanks.
matt


Are the numbers always sorted ascending? Then:

=IF(LEN(A1)-LEN(SUBSTITUTE(A1,",",""))<2,A1,
MID(A1,1+FIND(CHAR(1),SUBSTITUTE(A1,",",CHAR(1),
LEN(A1)-LEN(SUBSTITUTE(A1,",",""))-1)),99))

--ron
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Removing numbers to the left

Assume your numbers are sort in ascending order\
then try this:

=RIGHT(A1,3)
copy down


"mpenkala" wrote:

Hey,

I have a column of cells that contain either 1,2,3 or 4 numbers listed as so:

1
1,3
1,3,8
4,5,6,7

What I want is for a cell to look at the numbers and give me the 2 largest
numbers. If there is only 1 number, then it can return just that one number.


Thanks.
matt



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Removing numbers to the left

In which case, you can split your formula to put the answers into separate
cells.
--
David Biddulph

"mpenkala" wrote in message
...
Hi Fred,
spliting the data with text to columns doesn't work because the numbers
are
deterined using a formula. So when I go to use text to columns, it
attempts
to break up the formula instead of the numbers given.

Any other ideas? Thanks,
Matt


"Fred Smith" wrote:

The easiest way to do this is in two steps:

1. Separate your data into cells by using Text to Columns
2. Get the two largest numbers using the Large function.

Post back if you need more help on either. Also tell us what version of
Excel you are using.

Regards,
Fred.

"mpenkala" wrote in message
...
Hey,

I have a column of cells that contain either 1,2,3 or 4 numbers listed
as
so:

1
1,3
1,3,8
4,5,6,7

What I want is for a cell to look at the numbers and give me the 2
largest
numbers. If there is only 1 number, then it can return just that one
number.


Thanks.
matt





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 90
Default Removing numbers to the left

Hey Ron - this one works great, thanks!

Matt

"Ron Rosenfeld" wrote:

On Wed, 16 Apr 2008 15:41:02 -0700, mpenkala
wrote:

Hey,

I have a column of cells that contain either 1,2,3 or 4 numbers listed as so:

1
1,3
1,3,8
4,5,6,7

What I want is for a cell to look at the numbers and give me the 2 largest
numbers. If there is only 1 number, then it can return just that one number.


Thanks.
matt


Are the numbers always sorted ascending? Then:

=IF(LEN(A1)-LEN(SUBSTITUTE(A1,",",""))<2,A1,
MID(A1,1+FIND(CHAR(1),SUBSTITUTE(A1,",",CHAR(1),
LEN(A1)-LEN(SUBSTITUTE(A1,",",""))-1)),99))

--ron

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 90
Default Removing numbers to the left

Hey mama,

this would work great except for some of my numbers are double digits.

Thanks though.
Matt


"Teethless mama" wrote:

Assume your numbers are sort in ascending order\
then try this:

=RIGHT(A1,3)
copy down


"mpenkala" wrote:

Hey,

I have a column of cells that contain either 1,2,3 or 4 numbers listed as so:

1
1,3
1,3,8
4,5,6,7

What I want is for a cell to look at the numbers and give me the 2 largest
numbers. If there is only 1 number, then it can return just that one number.


Thanks.
matt

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Removing numbers to the left

On Thu, 17 Apr 2008 05:41:01 -0700, mpenkala
wrote:

Hey Ron - this one works great, thanks!

Matt


Glad to help. Thanks for the feedback.
--ron
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
removing dashes from numbers Pat Jones Excel Worksheet Functions 8 June 21st 07 08:44 PM
Numbers Left-Justifying tc69 Excel Discussion (Misc queries) 4 April 30th 07 02:20 PM
how to add numbers to the left or right of the existing numbers? yalanola Excel Discussion (Misc queries) 3 February 19th 06 11:08 AM
removing everything from the left after 10 digits tri_p Excel Worksheet Functions 3 September 30th 05 12:33 PM
Removing the ' before numbers giantwolf Excel Discussion (Misc queries) 7 September 8th 05 01:56 PM


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