Fill a cell with a number I click on in another cell

CopperheadFA

New Member
Joined
Dec 27, 2018
Messages
8
I know there's a way to do it but I'm clueless. I have a good bit of experience with Excel but one thing troubles me. How do I fill a cell with a number I click on in another cell?
Example: I click on let's say cell C3. I want it to be filled with the number that's in cell H6. How do I do that?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Re: Hello And Thanks For Having Me!

Try this:
This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("C3")) Is Nothing Then
If Target.Cells.CountLarge > 1 Then Exit Sub
Target.Value = Range("H6").Value
End If
End Sub
 
Upvote 0
Re: Hello And Thanks For Having Me!

If I'm not mistaken, to do this I need to right-click on the sheet name then click View Code. If that's the case, I tried your suggestion but it didn't work with what I'm trying to do.
 
Upvote 0
Re: Hello And Thanks For Having Me!

I'm confused what you want. You seemed happy with the first answer. =H6

With the script I provided if you click on Range("C3") the value in Range("H6") will now be entered into Range("C3")
 
Upvote 0
Re: Hello And Thanks For Having Me!

OK, I guess what I'm wanting to do is click on ANY cell in the "C" column and have it populated by ANY cell I click on in the array of cells with all the numbers in them. Hopefully this screenshot will help describe what I'm talking about.
BMQEKAAAAAElFTkSuQmCC
 
Upvote 0
Re: Hello And Thanks For Having Me!

Right click on H6, select Copy, right click on C3, select Paste (or Paste Special/Values).
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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