Re dimming:
You can dim j and i as "Integer" the value of an "Integer" can vary between -32768 to 32767
If you dim j and i as "Long" the value can vary between -2147483648 to 2147483647. So you could use "Integer" without any problem but if the value of i going from 56 to Range("D" & Rows.Count).End(xlUp).Row went up to 41000 the macro would stop at 32767.
So the "D41:D44 and D48:D51" should first be expressed as:
and then
Have not tested it but hopefully it's right, if not tell me and I'll have another go at it
Alf
Bookmarks