![]() |
Registrate date/time in a specific column for multiply selected rows
Goodmorning,
I like to get a macro that help me out; In an excell sheet I have selected multiply rows which are not always near eachother like row 2 till 5 and with CTRL row 10 till 20 and with CTRL row 30 till 35. Now I want to registrate the actual date/time for all those selected rows in column X So..... for all selected/activated rows set in column X the actual date/time stamp. Thats all :) regards, Johan |
Registrate date/time in a specific column for multiply selected rows
Hi Johan,
Am Sun, 15 Oct 2017 21:51:15 -0700 (PDT) schrieb : In an excell sheet I have selected multiply rows which are not always near eachother like row 2 till 5 and with CTRL row 10 till 20 and with CTRL row 30 till 35. Now I want to registrate the actual date/time for all those selected rows in column X try: Sub TimeStamp() Dim myRow As Range For Each myRow In Selection.Rows Cells(myRow.Row, "X") = Date Next End Sub Regards Claus B. -- Windows10 Office 2016 |
Registrate date/time in a specific column for multiply selected rows
Super thanks.
Other aditional item. After selection the multiply rows I need to delete in the whole column "FA" the text 'xyz' if it is registrated allthere. The fields were this could be registrated has nothing to do with the selected records (in first place), but this selection has to stay for another step. In steps; - Select all rows of the selected cells. - Delete the text 'xyz' (if there is) in all cells of column 'FA' (keep the selected rows from the first step selected). regards, Johan |
Registrate date/time in a specific column for multiply selected rows
Hi Johan,
Am Mon, 16 Oct 2017 05:12:41 -0700 (PDT) schrieb : In steps; - Select all rows of the selected cells. - Delete the text 'xyz' (if there is) in all cells of column 'FA' (keep the selected rows from the first step selected). try: Set myRng = Intersect(Selection, Columns("FA")) myRng.Replace what:="xyz", replacement:="" Regards Claus B. -- Windows10 Office 2016 |
Registrate date/time in a specific column for multiply selected rows
Thanks(!!),
It deletes only 'xyz' in the selected rows and not in the complete column FA regards, Johan |
Registrate date/time in a specific column for multiply selected rows
Hi Johan,
Am Mon, 16 Oct 2017 05:39:11 -0700 (PDT) schrieb : It deletes only 'xyz' in the selected rows and not in the complete column FA change the code to: Set myRng = Columns("FA") myRng.Replace what:="xyz", replacement:="" Regards Claus B. -- Windows10 Office 2016 |
Registrate date/time in a specific column for multiply selected rows
YES !!!! THANKS.
Regards, Johan |
All times are GMT +1. The time now is 08:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com