Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Excel how to get the left 5 characters of each cell in a specified column and put them into a new column

I want to take the left 5 characters of each cell in column E and put them into the adjoining cell in column F:

A...B....C...D......E..................F
123.bb...cc..dd.....90210ABCE13........90210
555.bb...cc..dd.....10056Z19s..........10056

Using Left(x, 5) function, how does Excel say "do this to every cell in the specified column"?

like image 243
Tim Avatar asked Jun 10 '13 19:06

Tim


2 Answers

1) Put =Left(E1,5) in F1

2) Copy F1, then select entire F column and paste.

like image 144
David Jashi Avatar answered Sep 19 '22 06:09

David Jashi


I find, if the data is imported, you may need to use the trim command on top of it, to get your details. =LEFT(TRIM(B2),8) In my case, I was using it to find a IP range. 10.3.44.44 with mask 255.255.255.0, so response is: 10.3.44 Kind of handy.

like image 36
user5477627 Avatar answered Sep 23 '22 06:09

user5477627