Click on number, which pastes that number in another cell

Nordicrx8

Board Regular
Joined
Dec 10, 2015
Messages
144
Office Version
  1. 365
Platform
  1. Windows
Hey all!

I scoured the internet and I'm either not finding how to achieve this, or I'm describing my need incorrectly. Hopefully someone can help here!

AF1QipOZHoXR4gM8oXqsCaRUOV_b5bZ-6kEKhRlIb7-d
Basically I created a calendar in excel. I want to be able to click on a date, and have that date appear in another cell. Is this possible? I tried hyperlinks, but I don't think it will work they way I'm looking for.

Any help/thoughts would be greatly appreciated! :)

thanks all!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
What is the cell where you want the date to appear?
 
Upvote 0
I don't know how you designed your calendar so if you click here you can download a sample file. The calendar will pop up if you click on any cell in column A. When you click a date in the calendar, that date will be inserted in the selected cell. You can change the range from column A to suit your needs. To make a change, right click the tab name for Sheet1 and click "View Code". Change the target range ("A:A") to whatever you like.
 
Upvote 0
I don't know how you designed your calendar so if you click here you can download a sample file. The calendar will pop up if you click on any cell in column A. When you click a date in the calendar, that date will be inserted in the selected cell. You can change the range from column A to suit your needs. To make a change, right click the tab name for Sheet1 and click "View Code". Change the target range ("A:A") to whatever you like.


Thank you! I was hoping for an always visible calendar, but I can make this work. A couple questions though:

It's kicking me to debug mode when I click on the cell where the calendar is located. It's highlighting "CalendarFrm.Show" when I run debug. Any ideas? (It works on your workbook)

Also, is there any way to do some conditional formatting to highlight a date in the calendar based on a cell value? EX: If A2 >50, highlight day in red.

Thanks again for all your help!!

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
CalendarFrm.Show
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Did you copy the CalendarFrm from the sample file to your actual file?
 
Upvote 0
I copied the code below. Do I need to copy something else?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
CalendarFrm.Show
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Oh, I just found the form! Trying to figure out how to add it now :) thanks again! any thoughts on the conditional formatting by chance?
 
Upvote 0
You are very welcome, :) You can easily copy the form simply by dragging and dropping it from one file to the other in the Visual Basic Editor in the left hand pane. I'm not sure about the conditional formatting.
 
Upvote 0
Got it to work! Thanks so much!! Also found a workaround for the conditional formatting. I'm new to VBA, so it looked a bit too complicated for this go around. maybe next time! Thanks again for all your help!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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