![]() |
Formula that just gets the first few numbers in a cell, not all?
I know there's a function or formula in Excel that allows you to just look at
the first or last few numbers in a particular cell. Ex.I need my if then formula to just look at the first 5 numbers in a cell (the zip code) and ignore the -3645 behind the zip code. help? |
Formula that just gets the first few numbers in a cell, not all?
=left(a1, 5)
There is also right and mid to manipulate text. Note that these functions return text, so if you need to get the numbe rback youwill need to use the value funtion... -- HTH... Jim Thomlinson "KenCanuck" wrote: I know there's a function or formula in Excel that allows you to just look at the first or last few numbers in a particular cell. Ex.I need my if then formula to just look at the first 5 numbers in a cell (the zip code) and ignore the -3645 behind the zip code. help? |
Formula that just gets the first few numbers in a cell, not all?
First few LEFT, last few RIGHT
-- David Biddulph "KenCanuck" wrote in message ... I know there's a function or formula in Excel that allows you to just look at the first or last few numbers in a particular cell. Ex.I need my if then formula to just look at the first 5 numbers in a cell (the zip code) and ignore the -3645 behind the zip code. help? |
Formula that just gets the first few numbers in a cell, not all?
=LEFT(A1,5)
or =MID(A1,1,5) two formula above are return text value not real Excel value. To covert text value to real Excel value you can use one of these formula. =--LEFT(A1,5) =LEFT(A1,5)+0 =LEFT(A1,5)*1 =LEFT(A1,5)^1 =VALUE(LEFT(A1,5)) =LEFT(A1,5)/1 =LEFT(A1,5)-0 Samething for MID function "KenCanuck" wrote: I know there's a function or formula in Excel that allows you to just look at the first or last few numbers in a particular cell. Ex.I need my if then formula to just look at the first 5 numbers in a cell (the zip code) and ignore the -3645 behind the zip code. help? |
All times are GMT +1. The time now is 02:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com