Hi,
I’d appreciate guidance please, on coding the following in an Excel 2007 workbook –
While there is data in col B, work down col K starting from K2
If K2 is blank, move to K3, and so on
When you come to a nonblank cell in col K, let’s use K5 as an example, check the LEN
If Len(K5) = 11, then insert one blank row under row 5, and copy values from cells C5 to J5 into the newly inserted C6 to J6. Copy K5 into B6
If LEN(K5) = 23, then insert TWO blank rows under row 5, and copy values from cells C5 to J5 into the newly inserted C6 to J6, and C7 to J7. Copy LEFT(K5,11) into B6, and Copy RIGHT(K5,11) into B7
If LEN(K5) = 35, then insert THREE blank rows under row 5, and copy values from cells C5 to J5 into the newly inserted C6 to J6, C7 to J7, and C8 to J8. Copy LEFT(K5,11) into B6, copy MID(K5,13,11) into B7 and copy RIGHT(K5,11) into B8.
As ever, all help gratefully received.
Cheers,
Phil
I’d appreciate guidance please, on coding the following in an Excel 2007 workbook –
While there is data in col B, work down col K starting from K2
If K2 is blank, move to K3, and so on
When you come to a nonblank cell in col K, let’s use K5 as an example, check the LEN
If Len(K5) = 11, then insert one blank row under row 5, and copy values from cells C5 to J5 into the newly inserted C6 to J6. Copy K5 into B6
If LEN(K5) = 23, then insert TWO blank rows under row 5, and copy values from cells C5 to J5 into the newly inserted C6 to J6, and C7 to J7. Copy LEFT(K5,11) into B6, and Copy RIGHT(K5,11) into B7
If LEN(K5) = 35, then insert THREE blank rows under row 5, and copy values from cells C5 to J5 into the newly inserted C6 to J6, C7 to J7, and C8 to J8. Copy LEFT(K5,11) into B6, copy MID(K5,13,11) into B7 and copy RIGHT(K5,11) into B8.
As ever, all help gratefully received.
Cheers,
Phil