![]() |
Macro Help
I have a macro that copies values from one Worksheet (A) in a Workbook to a
range in another Worksheet (B) in the same Workbook. Some times the values in workbook A will be empty and the Macro copies over a blank /Zero value. I would like to modify the macro in such a way that If the Cell In worksheet A is empty that zero value will not be copied over to worksheet (B) & That the next value that is pasted in Workbook B will be put below the last value. In other words I would like no spaces to be left in the range. Below is an excerpt of my Macro. Sub CVSCopy() ' ' CVSCopy Macro Sheets(4).Range("C20").Value = Sheets(2).Range("H6").Value Sheets(4).Range("C21").Value = Sheets(2).Range("H7").Value Sheets(4).Range("C22").Value = Sheets(2).Range("H10").Value Sheets(4).Range("G20").Value = Sheets(2).Range("J6").Value Sheets(4).Range("G21").Value = Sheets(2).Range("J7").Value Sheets(4).Range("G22").Value = Sheets(2).Range("J10").Value Sheets(4).Range("G24").Value = Sheets(2).Range("L39").Value Sheets(4).Range("G25").Value = Sheets(2).Range("L46").Value Sheets(4).Range("C28").Value = Sheets(2).Range("H15").Value Sheets(4).Range("C29").Value = Sheets(2).Range("H28").Value |
All times are GMT +1. The time now is 05:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com