• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

macro / formula to check a column and return the text

Injinia

Member
Hi,


I have a set of data on one column. everytime new town data begins, the text Town:267 precedes the data and so on until the next Town 268.


I would like these town names to be copied on the adjacent column next to the data so that I can filter it out if needed. Therefore, there would be like Town:267 the cell next to the data pertaining to this twon until the town name changes to a different town name.


-Injinia
 
Hi Injinia,


Copy this formula down to fetch the first eight characters of the text that you can filter:

[pre]
Code:
=LEFT(A1,8)
[/pre]
Faseeh
 
Hi Faseeh


That doesn't work because the text Town267 is not then copied to every row of data under it.


The data looks something like this:

Town:267

Exact

Ops

200

300

Town:268

400

500

Carts

Town:269

-

-

-

so everytime there is town, the data under it should have that town name to the cell adjacent.


Cheers, injinia
 
How about:

=IF(LEFT(A2,4)="Town",A2,B1)


If this isn't correct, could you post an example of what you'd like to see?
 
Back
Top