ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Another Formula Please? (https://www.excelbanter.com/excel-discussion-misc-queries/118138-another-formula-please.html)

Saxman

Another Formula Please?
 
The following data is in cells A1,A2.

16K (C7)
7K (C4)

I need to extract 16 and 7 into different cells.

=LEFT(A1,2) handles the 16.
=LEFT(A2) handles the 7.

What is the formula for handling single and double digits please?

Thanks.

PCLIVE

Another Formula Please?
 
One way:

=LEFT(A2,FIND("K",A2)-1)


HTH,
Paul

"Saxman" wrote in message
...
The following data is in cells A1,A2.

16K (C7)
7K (C4)

I need to extract 16 and 7 into different cells.

=LEFT(A1,2) handles the 16.
=LEFT(A2) handles the 7.

What is the formula for handling single and double digits please?

Thanks.




Duke Carey

Another Formula Please?
 
2 ways

=left(A1,len(a1)-1) - results in text

if it's always a "k"

=SUBSTITUTE(A1,"k","") - also results in text

If you want the result to be a number, do something like

=SUBSTITUTE(A1,"k","")*1


"Saxman" wrote:

The following data is in cells A1,A2.

16K (C7)
7K (C4)

I need to extract 16 and 7 into different cells.

=LEFT(A1,2) handles the 16.
=LEFT(A2) handles the 7.

What is the formula for handling single and double digits please?

Thanks.


Saxman

Another Formula Please?
 
PCLIVE wrote:
One way:

=LEFT(A2,FIND("K",A2)-1)


This works perfectly. Thanks to all.

I must compliment the 'experts' on this group for their dedicated
support. A really useful group.

CLR

Another Formula Please?
 
Another way would be to do Data TextToColumns and use K as the delimiter
and choosing not to import the data to the right...........the beauty of this
method is that it does not require a helper column.

Vaya con Dios,
Chuck, CABGx3




"Saxman" wrote:

The following data is in cells A1,A2.

16K (C7)
7K (C4)

I need to extract 16 and 7 into different cells.

=LEFT(A1,2) handles the 16.
=LEFT(A2) handles the 7.

What is the formula for handling single and double digits please?

Thanks.



All times are GMT +1. The time now is 09:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com