Consulting

Results 1 to 4 of 4

Thread: Solved: Single click on cell should store value in another cell

  1. #1

    Solved: Single click on cell should store value in another cell

    Hi,

    I Please find the attacched file can any one help me to store value in "F6" by single click on provide value in "f14,f15,i14,i15) this is an example but in orignal file range is (G14:F30)

    Regards,
    Rajesh

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Const WS_RANGE As String = "F12,F13,I12,I13" '<== change to suit

    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then

    Me.Range("E8").Value = Target.Value
    End If

    End Sub
    [/vba]

    This is worksheet event code, which means that it needs to be
    placed in the appropriate worksheet code module, not a standard
    code module. To do this, right-click on the sheet tab, select
    the View Code option from the menu, and paste the code in.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks so much for your help

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,065
    Location
    Hi rajesh,

    If this issue is to your satisfaction, please use the Thread Tools to mark this as "Solved"
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •