Hi,
I need help coding the following please –
I have an Excel 2007 worksheet with customer details in cols A to J, with col B containing the customer’s primary reference number.
Some customers have secondary reference numbers in col K, ranging from 1 ref upwards. If more than 1, the refs are separated by commas e.g. AS123,DF4567,JK987456,VB753159 (note – no spaces between refs, and no comma after the last one)
What I need the code to do is –
While there is data in col B, work down col K row by row starting at K2
If cell in col K is blank – do nothing, and look at next row
If cell in col K e.g K5 is nonblank – insert a new row for each ref. i.e. if K5 contained 4 refs, insert 4 new rows beneath row 5, and copy the 4 refs into cells B6, B7, B8, & B9. Then copy the relevant values in cells A5, and C5 to J5 down the 4 new rows.
In a nutshell – I need to amalgamate customers’ primary and secondary refs into one list
This is a variance of my initial problem which was kindly solved by Craig at
http://www.mrexcel.com/forum/showthread.php?t=563410&goto=newpost
Any help will be much appreciated
Cheers,
Phil
I need help coding the following please –
I have an Excel 2007 worksheet with customer details in cols A to J, with col B containing the customer’s primary reference number.
Some customers have secondary reference numbers in col K, ranging from 1 ref upwards. If more than 1, the refs are separated by commas e.g. AS123,DF4567,JK987456,VB753159 (note – no spaces between refs, and no comma after the last one)
What I need the code to do is –
While there is data in col B, work down col K row by row starting at K2
If cell in col K is blank – do nothing, and look at next row
If cell in col K e.g K5 is nonblank – insert a new row for each ref. i.e. if K5 contained 4 refs, insert 4 new rows beneath row 5, and copy the 4 refs into cells B6, B7, B8, & B9. Then copy the relevant values in cells A5, and C5 to J5 down the 4 new rows.
In a nutshell – I need to amalgamate customers’ primary and secondary refs into one list
This is a variance of my initial problem which was kindly solved by Craig at
http://www.mrexcel.com/forum/showthread.php?t=563410&goto=newpost
Any help will be much appreciated
Cheers,
Phil