Enter Date while range selected

Papi

Well-known Member
Joined
May 22, 2007
Messages
1,592
Say rows 22:35 are selected and column K needs todays date in each of the cells from K22:K35 that a macro could do that? The rows would vary each time eg. next time could be 36:72 or 36:36 etc.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
If you wanted to put the date in column K of the selected row try this.
Code:
Intersect(Selection.EntireRow, Range("K:K")).Value = Date
 
Upvote 0
Thank you both. Very nice. Could the same apply if there is a cell with text eg. A1 and that it could also enter that while in column L of the range the same way? It could be a named cell if that would help.
 
Upvote 0
Sorry I don't follow what you mean.

Do you meant put the value from A1, or a named cell, into column L of the selected rows?
 
Upvote 0
All you need to change is the column and the source.
Code:
Intersect(Selection.EntireRow, Range("L:L")).Value = Range("A1").Value
 
Upvote 0
Norie. It amazes me how some of you folks have a way to make this stuff look like magic, even to old timers like me.

Just thinking of another workbook, could the same be done with a window opening up and allowing the user to enter something in the window to accomplish the same thing?
 
Upvote 0
Do you mean something to allow the user to enter the data?
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top