ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need Excel Function that will return # of char in preceding cell (https://www.excelbanter.com/excel-discussion-misc-queries/31425-need-excel-function-will-return-char-preceding-cell.html)

klafert

Need Excel Function that will return # of char in preceding cell
 
I used it before and cant remeber the function command that will allow me to
copy just the 1st 5 numbers in a cell to another cell. Thes cells are like C
& D.

Thanks for your help. Command just slipping my mind.

Ragdyer

Are you perhaps talking about:

In D1, enter,

=LEFT(C1,5)
OR
=--LEFT(C1,5)
to retain numerical format.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"klafert" wrote in message
...
I used it before and cant remeber the function command that will allow me

to
copy just the 1st 5 numbers in a cell to another cell. Thes cells are like

C
& D.

Thanks for your help. Command just slipping my mind.



IanRoy

In D1, LEFT(C1,5) will return the first five characters in C1.

"klafert" wrote:

I used it before and cant remeber the function command that will allow me to
copy just the 1st 5 numbers in a cell to another cell. Thes cells are like C
& D.

Thanks for your help. Command just slipping my mind.


olasa


The 'first' 5 numbers can be interpreted in two ways:

123456
=LEFT(C1,5) --- "12345" (this is a text)
=--LEFT(C1,5) ---12345 (this is a number)

654321
=RIGHT(C1,5) --- "54321" (this is a text)
=--RIGHT(C1,5) ---54321 (this is a number)

HTH
Ola Sandström


--
olasa
------------------------------------------------------------------------
olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760
View this thread: http://www.excelforum.com/showthread...hreadid=380387



All times are GMT +1. The time now is 12:36 PM.

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