ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need help - Macro to copy a specific range (https://www.excelbanter.com/excel-worksheet-functions/121365-need-help-macro-copy-specific-range.html)

Dileep Chandran

Need help - Macro to copy a specific range
 
Hello everybody,

I have a macro to copy a range of cells (A2:AB100) from sheet1 and
paste it to another file as values.

Set sourceRange = ThisWorkbook.Worksheets("Sheet1").Range("A2:AB100" )

I would like to insert one more code so as it should copy only todays
data;

If B2 = todays date then the range of cells to copy should be (A2:AB2)
If B3 = todays date then the range of cells to copy should be (A3:AB3)
If both B2 and B3 = todays date then the range of cells to copy should
be (A2:AB3)
If all the cells from B2 to B100 = todays date then the range of cells
to copy should be (A2:AB100)

Any help is greatly appreciated.

Thanks & Regards
Dileep Chandran



All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com