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?
 
Re: Hello And Thanks For Having Me!

Not sure what all this is:
If it's a image I cannot see it. Your request was very simple.
If I click on C3 then I want what is in H6 entered in C3.

I need to see no image.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Re: Hello And Thanks For Having Me!

Sorry but I cant seem to get an image attached so anyone can see what im talking about. I'm sorry if I'm wasting anyone's time with this.
 
Upvote 0
Re: Hello And Thanks For Having Me!

A lot of times images still do not explain what you want.

Can you not explain in words what you want?
 
Upvote 0
Re: Hello And Thanks For Having Me!

I've been trying to do just that.
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C
[/TD]
[TD="align: center"]D
[/TD]
[TD="align: center"]E
[/TD]
[TD="align: center"]F
[/TD]
[TD="align: center"]G
[/TD]
[TD="align: center"]H
[/TD]
[TD="align: center"]I
[/TD]
[TD="align: center"]J
[/TD]
[/TR]
[TR]
[TD="align: center"]1
[/TD]
[TD="align: center"]10
[/TD]
[TD="align: center"]*
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]=
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]10
[/TD]
[TD="align: center"]20
[/TD]
[TD="align: center"]30
[/TD]
[/TR]
[TR]
[TD="align: center"]2
[/TD]
[TD="align: center"]15
[/TD]
[TD="align: center"]*
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]=
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]15
[/TD]
[TD="align: center"]25
[/TD]
[TD="align: center"]35
[/TD]
[/TR]
[TR]
[TD="align: center"]3
[/TD]
[TD="align: center"]20
[/TD]
[TD="align: center"]*
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]=
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]20
[/TD]
[TD="align: center"]30
[/TD]
[TD="align: center"]40
[/TD]
[/TR]
[TR]
[TD="align: center"]4
[/TD]
[TD="align: center"]25
[/TD]
[TD="align: center"]*
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]=
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]25
[/TD]
[TD="align: center"]35
[/TD]
[TD="align: center"]45
[/TD]
[/TR]
</tbody>[/TABLE]

Example: Highlight D1, then click J3 to automatically populate to automatically finish the function in F1.

HOPEFULLY I was able to explain it this time, even though there are no photos attached.
 
Upvote 0
Re: Hello And Thanks For Having Me!

You said:
Highlight D1

What does Highlight mean?

Hightlight is not a Excel Term

You said:
finish the function in F1.

What function do you have in F1

Do you mean a User Define Function?




 
Upvote 0
Re: Hello And Thanks For Having Me!

Do you mean something like this?

Open a copy of your workbook. Right click on the sheet tab on the bottom and select View Code. In the window that opens paste this code:

Code:
Private Sub Worksheet_SelectionChange(ByVal target As Range)

    If Intersect(target, Range("H:J")) Is Nothing Then Exit Sub
    
    Cells(target.Row, "D") = target.Value
    Select Case Cells(target.Row, "C").Value
        Case "*"
            Cells(target.Row, "F") = Cells(target.Row, "B").Value * target.Value
        Case "/"
            Cells(target.Row, "F") = Cells(target.Row, "B").Value / target.Value
        Case "+"
            Cells(target.Row, "F") = Cells(target.Row, "B").Value + target.Value
        Case "-"
            Cells(target.Row, "F") = Cells(target.Row, "B").Value - target.Value
    End Select
        
End Sub
Close the VBA editor (Alt-Q or the red X). Now if your sheet is set up like your example in post 14, you can click in any of the H:J columns, the value you click on will be moved to column D of that row, and it will calculate the result of the equation in column F.
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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