+ Reply to Thread
Results 1 to 6 of 6

A question about code to write when clicked.

  1. #1
    Registered User
    Join Date
    07-23-2021
    Location
    USA
    MS-Off Ver
    18.2106.12410.0
    Posts
    4

    A question about code to write when clicked.

    Hello! I have attached a visual to this message as an example of what I'm looking for. I'm having trouble finding VB code to plug in for this project I need to get done. Here is what I would like: when I click on "John" I want the next cell to be his name and then the red cells in his row filled in with specific numbers. Then, if I were to click on "Baker" it would do the same thing, it would fill Baker's row with his name and then specific numbers. I have about fifty names that need to have this same thing done to them. What would be the easiest way to do this? Thank you SO much for your help! EXAMPLE.png

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: A question about code to write when clicked.

    Identifying row where you click and locate and fills cells is not big problem, my question is: where these 'specific numbers' to put in came from?
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    07-23-2021
    Location
    USA
    MS-Off Ver
    18.2106.12410.0
    Posts
    4

    Re: A question about code to write when clicked.

    So the numbers may change once or twice a year, but not often. They come from a list that my job gives me. Currently, I am having to fill them in by hand, so I'd like to expedite the process by having code to just click the name and it fills it all out for me. I would hope that, down the line, when the numbers do change, I'd be able to just go back into the code and update the numbers to whatever they need to be. Thank you very much for the quick response! I'd really appreciate any tips you can give me
    Last edited by Full_Circle256; 07-23-2021 at 11:17 AM.

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: A question about code to write when clicked.

    I've put it into double click not just click cell (select).
    Go to VBA editor (Alt+F11) and into code of sheet put:

    Please Login or Register  to view this content.
    Check attached file.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-23-2021
    Location
    USA
    MS-Off Ver
    18.2106.12410.0
    Posts
    4

    Re: A question about code to write when clicked.

    Hey, I was out of the office for a few days so I am just seeing this now. You saved my butt! Thank you so much for taking the time to help me out. It works perfectly and in testing is doing exactly what I need it to do. Thank you again! :D :D :D

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: A question about code to write when clicked.

    Happy to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to write clicked cell value
    By dobracik in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-30-2015, 04:39 AM
  2. Write VBA Code/Macro for this question.
    By anasraza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-25-2015, 08:27 PM
  3. Run VBA code when cell is clicked
    By lostest in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-25-2015, 04:04 PM
  4. Replies: 4
    Last Post: 09-26-2015, 06:44 PM
  5. [SOLVED] code so that when a cell is clicked, a tick mark goes in the cell that was clicked
    By behnam in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2013, 01:17 PM
  6. Replies: 1
    Last Post: 10-17-2010, 07:11 PM
  7. Macro Question - How to write this code
    By lynv in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 05-27-2010, 03:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1