ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Text to a number (https://www.excelbanter.com/excel-worksheet-functions/184995-text-number.html)

Dave[_7_]

Text to a number
 
I received a large csv file from our vendor and I would like to use Excel
functions.
I currently have a cell that has the following value:

19:00

I would like convert this to the number 19. There are also blank spaces in
front of the value above.

Thank you for any help you can give, Dave



Reitanos

Text to a number
 
Do all of the numbers have a colon? If so, try:
=TRIM(LEFT(A1,(FIND(":",A1)-1)))

TRIM takes out any spaces
FIND locates the colon (the -1 tells it capture one less than the
position of the colon)
LEFT tells it to capture the data preceding the found colon

On Apr 24, 11:09 am, "Dave" wrote:
I received a large csv file from our vendor and I would like to use Excel
functions.
I currently have a cell that has the following value:

19:00

I would like convert this to the number 19. There are also blank spaces in
front of the value above.

Thank you for any help you can give, Dave




All times are GMT +1. The time now is 10:11 PM.

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