I have one excel Sheet having below records
id Empname state
1 steve NJ
2 karl NYC
I have to write one macro to prepare sql update stement like below and insert into new sheet within the same workbook.
UPDATE emp SET state='NJ' WHERE id=1
UPDATE emp SET state='NYC' WHERE id=2
Any suggestions or ideas please.
Regards,
Raju
Use below sub and you should be all set