Thanks for the reply! Unfortunately that did not solve the problem. I had to change your code a little because my sheets are not called 'Sheet1' 'Sheet2' ... etc. Is there anything else you changed in the code other than using Sheets("Sheet Name"). instead of Sheet1.?
I can't upload the workbook because it is massive, but I took some screen shots of what I am getting.
Debug.JPG
Sheet Names.JPG
Type Mismatch.JPG
Here is a table giving an idea of what the sheet that the macro is pulling its values from looks like and the formulas in those cells.
Formulas
Column D =IF(ISBLANK(INDIRECT("A"&ROW())),"",IF(ISBLANK(INDIRECT("A"&ROW()+1)),"'"&
INDIRECT("A"&ROW())&"'","'"&INDIRECT("A"&ROW())&"'"&IF(OR(ROW()=41,ROW()=81,ROW()=121,ROW()=161,
ROW()=201),"",",")))
Column H =IF(csvRange(D2:D41)="","'0'",csvRange(D2:D41))
|
A |
B |
C |
D |
E |
F |
G |
H |
I |
1 |
SKU |
Name |
|
Formatted SKU |
|
|
|
Include Since |
2005 |
2 |
54321 |
'Book Name1' |
|
'54321', |
|
|
|
|
|
3 |
98765 |
'Book Name2' |
|
'98765', |
|
|
Line |
Criteria |
|
4 |
76543 |
'Book Name3' |
|
'76543', |
|
|
Line 1 |
'54321','98765','76543',... |
|
Also, here is the code for the csvRange
Bookmarks