Excel 2007, splitting text

Soldato
Joined
7 Mar 2011
Posts
6,859
Location
Oldham, Lancashire
This should be really simple but I am just blacking out. I need to go down a list of postcodes and pull just the first part. The best method I could come up with, doesnt actually exist as a thing :confused:

Code:
Cells(rowNumber, 3) = Cells(rowNumber, 1).Split(0)
 
They are always split traditionally, so like AB1 2CD (only valid, obviously).
Dumping the "AB1" into a cell is just a placeholder for the next step, I will then need to use that first bit to match up with something else int he function. That's why I am using VBA.

The function I am trying to write will eventually dump a location into the cell ready for me to do other stuff with it.

This would be so much easier if IT just let me have Python lol.
 
Back
Top Bottom