ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to copy and past selected rows only... (https://www.excelbanter.com/excel-programming/295046-macro-copy-past-selected-rows-only.html)

Jules[_4_]

Macro to copy and past selected rows only...
 
Hi there, I am very new to this so bear with me

I have 4 excel 97 spreadsheets that I am looking to have the following work in

In Col A each row is a formula that says basically if Col D"",Today(),"" To add todays Dat
In Col B each row is a formula that says basicaly if Col D"",B1+1,"" (B1 being the row above) To add a consecutive Invoice number

Each sheet is updated by a different person and will have a different number of rows on any given day
What I need to be able to do is select the number of rows that have data entered into them and Copy+Paste Values of Col A & B. The problem that I am having is that excel sees the formula in the blank cell as data in the cell and selects it as part of the End +down function. I was thinking could right an If...Then macro to loop through and check Col D, if it finds data, then copy and paste values of Cols A & B, but like I said I am very new to this and don't really know how to write new macros. I have been slightly successful in editing macros that I have recorded, but this is a bit beyond me

If I need to be more clear, please let me know. Thanks for the input.

Jules[_5_]

Macro to copy and past selected rows only...
 
OOps, I almost forgot, I also need it to run at 9:00pm every night

----- Jules wrote: ----

Hi there, I am very new to this so bear with me

I have 4 excel 97 spreadsheets that I am looking to have the following work in

In Col A each row is a formula that says basically if Col D"",Today(),"" To add todays Dat
In Col B each row is a formula that says basicaly if Col D"",B1+1,"" (B1 being the row above) To add a consecutive Invoice number

Each sheet is updated by a different person and will have a different number of rows on any given day
What I need to be able to do is select the number of rows that have data entered into them and Copy+Paste Values of Col A & B. The problem that I am having is that excel sees the formula in the blank cell as data in the cell and selects it as part of the End +down function. I was thinking could right an If...Then macro to loop through and check Col D, if it finds data, then copy and paste values of Cols A & B, but like I said I am very new to this and don't really know how to write new macros. I have been slightly successful in editing macros that I have recorded, but this is a bit beyond me

If I need to be more clear, please let me know. Thanks for the input.


All times are GMT +1. The time now is 03:42 PM.

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