ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find empty cell then insert range in active row (https://www.excelbanter.com/excel-worksheet-functions/455336-find-empty-cell-then-insert-range-active-row.html)

Keyrookie December 3rd 21 11:52 PM

Find empty cell then insert range in active row
 
Need help please!

Below is my current code that I believe can be more efficiently executed. I have the times in Range ("F50:I50") that I would like inserted into the next blank row in the range (F9:I16). Thanks for your help.


Range("f9:f16").Find("").Activate

ActiveCell.Value = "8:00 AM": ActiveCell.Offset(0, 1).Activate

ActiveCell.Value = "12:00 PM": ActiveCell.Offset(0, 1).Activate

ActiveCell.Value = "1:00 PM": ActiveCell.Offset(0, 1).Activate

ActiveCell.Value = "5:00 PM"

Keyrookie December 20th 21 05:39 PM

Quote:

Originally Posted by Keyrookie (Post 1633790)
Need help please!

Below is my current code that I believe can be more efficiently executed. I have the times in Range ("F50:I50") that I would like inserted into the next blank row in the range (F9:I16). Thanks for your help.


Range("f9:f16").Find("").Activate

ActiveCell.Value = "8:00 AM": ActiveCell.Offset(0, 1).Activate

ActiveCell.Value = "12:00 PM": ActiveCell.Offset(0, 1).Activate

ActiveCell.Value = "1:00 PM": ActiveCell.Offset(0, 1).Activate

ActiveCell.Value = "5:00 PM"



Found a faster approach but still wanting to speed up the macro. Here's my current code:

Range("F9:F16").Find("").Activate
Range("F50:I50").Copy: ActiveCell.PasteSpecial Paste:=xlPasteValues


All times are GMT +1. The time now is 04:39 PM.

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