+ Reply to Thread
Results 1 to 2 of 2

If cell in column Q of row clicked on says "Yes" pull out info to word, if "No" stop VBA

  1. #1
    Registered User
    Join Date
    03-20-2020
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    10

    Question If cell in column Q of row clicked on says "Yes" pull out info to word, if "No" stop VBA

    I have no idea where to start so any help is appreciated!

    So far, I managed to figure out one thing which is to run the code if a cell in column Y is clicked. That's about 1% of what I need it to do...

    What I need it to do is:

    - Run the code if cell in column Y is clicked
    - Register the selected row and look at column Q (e.g. if I click on cell Y4, look at Q4, if Y6 is clicked, look at Q6, etc.)
    (I'll use row 4 going forward but it needs to be fluid as to whichever row is clicked)
    - If e.g. Q4 says "No" stop the macro
    - If e.g. Q4 says "Yes", first check if Z4 has a date in it - if "Yes", msg box pops up saying "Are you sure you want to re-export?", if "No", stop macro.
    - If "Yes" do the same that would happen if Z4 has no date which is...
    - Copy what is in columns C, D, E, H, K, L, M, O, P and Q and whack it into a word document

    If it's not possible to register which row is clicked, then alternative I'm thinking is cycle through each row with the same condition (i.e. skip all the rows where in column Q it says No) and whack it all in a word doc, each row having it's own page (i.e. row 4 is page 1 in word, row 5 is page 2 in word, etc.)

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: If cell in column Q of row clicked on says "Yes" pull out info to word, if "No" stop V

    To use the selected Row then refer to it using Target.Row

    eg if Y4 is clicked then
    Please Login or Register  to view this content.
    will be referring to A4
    If someone has helped you then please add to their Reputation

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  4. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  5. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  6. Replies: 0
    Last Post: 07-09-2009, 04:07 PM
  7. Replies: 6
    Last Post: 01-08-2006, 06:20 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