views:

31

answers:

1

Hello,

bascially, i have got a column consist of data that i want those starts with "EMUA-I" to be place at the front, with the ascending order of date. Then i want the "non EMUA-I" part to be placed at the back with the ascending order of date.

please take a look at this reference file : http://www.speedyshare.com/files/23397356/1.xls

I need VBA script to perform the job as this documents need future update.

Thanks

+1  A: 

Without knowing the exact structure of your spreadsheet (No viruses for me, thank you) it seems like you could accomplish this by creating a new column with a formula to extract the prefix, then sort by the new column and ascending date.

Assuming your spreadsheet looks something like this:

Part            Date
-------------   -----
non EMUA-I321   1-Jun
EMUA-I123       2-Jun
EMUA-I546       1-Mar
non EMUA-I789   1-May

Add a Type column with the formula =IF(LEFT([YourPartNoCellHere],6) = "EMUA-I", 0, 1). Then sort by this column and then by your date column .

BenV