+ Reply to Thread
Results 1 to 5 of 5

VBA Grab specific cell value from active row

  1. #1
    Registered User
    Join Date
    04-06-2021
    Location
    spain
    MS-Off Ver
    professional plus 2010
    Posts
    34

    VBA Grab specific cell value from active row

    Greetings fellow excel experts,

    A very friendly forum expert helped me in the making of the following code;

    Please Login or Register  to view this content.
    I only need to edit the last part of it though. So what the code does is it grabs the info from X Y and Z cells (figuratively speaking) and puts them all lined up on a row in a separate workbook, there's no spaces between rows. Each row has a number in column B, the code starts pasting info from column C onwards, the small edit I need to figure out is for the code to grab the number in column B of that same row it just added the info, and then take it back to the original workbook where this macro was ran and paste that number on any cell (f.e. W20).

    Anyone got any ideas?

    Best regards.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,472

    Re: VBA Grab specific cell value from active row

    This
    Please Login or Register  to view this content.
    gives you the row number where it is going to write the data. Is that what you want to return?

    If so, maybe
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-06-2021
    Location
    spain
    MS-Off Ver
    professional plus 2010
    Posts
    34

    Re: VBA Grab specific cell value from active row

    Hello,

    Yes, that gives me the row where the macro starts adding "varEntries" one by one, but the number is also on a specific column, its in column 2 (B).
    My guess is that it should be something along the lines of;

    Please Login or Register  to view this content.
    But this only for the first varEntry and it would go before this piece of code
    Please Login or Register  to view this content.
    But then once that part is done, it also needs to come back to the original file where this macro was run and then paste the value on W20.
    So this macro is run on, lets say, an invoice template. And when you run it, it registers the invoice in an overview workbook, and when it does so a number is assigned to it. So it needs to take that number from the overview workbook and bring it back.

    Best regards.

  4. #4
    Registered User
    Join Date
    04-06-2021
    Location
    spain
    MS-Off Ver
    professional plus 2010
    Posts
    34

    Re: VBA Grab specific cell value from active row

    Nevermind, after further testing the code you provided gets the job done.

    Thank you.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,472

    Re: VBA Grab specific cell value from active row

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Macro to grab screenshot and paste into the single or active worksheet
    By happyhardik in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-01-2022, 01:08 AM
  2. [SOLVED] Grab the specific parts of text in cell and print to other cell
    By Vihral in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-06-2020, 09:15 AM
  3. VBA to automatically change specific cell value to active cell in specific range
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2016, 04:53 PM
  4. Selecting specific Row in an Active Cell.
    By nicoloideon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2014, 03:18 AM
  5. [SOLVED] Find Value in Sheet Named After Cell and Grab Specific Cell Value
    By Caulerpa in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-21-2013, 02:21 PM
  6. Grab specific string from one cell and post it in another.
    By Lazarus74 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-14-2012, 02:55 AM
  7. Excel 2007 : Grab Data in a Specific Day
    By OrangeBoy in forum Excel General
    Replies: 0
    Last Post: 10-10-2011, 05:14 AM

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