+ Reply to Thread
Results 1 to 10 of 10

Macro/VBA help

  1. #1
    Registered User
    Join Date
    08-06-2019
    Location
    Romania
    MS-Off Ver
    2019
    Posts
    24

    Macro/VBA help

    Hi,

    I would like to create a macro/vba/script (really anything that makes sense) to do the following things

    I want to run thru all the tabs that are within a excel worksheet and find the last entry for a specific column.

    I want the program to display two things. Find the last entry of a column (lets say column C of the attached file) and the sheet name associated with it.

    any help would be appreciated.

    thank you!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-21-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    58

    Re: Macro/VBA help

    Hi,
    try this

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-06-2019
    Location
    Romania
    MS-Off Ver
    2019
    Posts
    24

    Re: Macro/VBA help

    Thank you so much. It does the job. Thank you!

    A favor: I want to learn how you came up with this code. Would it be possible to add some comments. I do not have a lot of experience with excel coding.
    Also, can i get it in the "Immediate" window instead of the result being a message
    Last edited by mki16101; 08-06-2019 at 05:16 PM.

  4. #4
    Registered User
    Join Date
    08-06-2019
    Location
    Romania
    MS-Off Ver
    2019
    Posts
    24

    Re: Macro/VBA help

    I want to copy the result that I get out of the code. As it comes out as a message, I can't copy it

  5. #5
    Registered User
    Join Date
    07-21-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    58

    Re: Macro/VBA help

    Quote Originally Posted by mki16101 View Post
    can i get it in the "Immediate" window instead of the result being a message
    Please Login or Register  to view this content.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro/VBA help

    Quote Originally Posted by mki16101 View Post
    Also, can i get it in the "Immediate" window instead of the result being a message
    Perhaps
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  7. #7
    Registered User
    Join Date
    08-06-2019
    Location
    Romania
    MS-Off Ver
    2019
    Posts
    24

    Re: Macro/VBA help

    thank you for explaining the code in such great details. But I am still unable to copy the message. Any thoughts?

  8. #8
    Registered User
    Join Date
    08-06-2019
    Location
    Romania
    MS-Off Ver
    2019
    Posts
    24

    Re: Macro/VBA help

    Thank you Richard and MrGes. I am all set. thank you

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro/VBA help

    Maybe write the message to a cell and then copy the cell. i.e.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    07-21-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    58

    Re: Macro/VBA help

    Copy with CTRL+C
    Attached Files Attached Files

+ 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 showing error ( macro not found ) while trying to execute macro every 1 minute
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2018, 07:58 PM
  2. [SOLVED] Define variable in macro than calling that macro inside another macro
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2015, 10:58 AM
  3. Using a macro on workbook1 to create a button in wb2 and assigning macro "wb2!macro"
    By penfold1992 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2014, 11:39 AM
  4. [SOLVED] Macro to show Which macro didnt work in a nested macro
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-10-2013, 03:21 AM
  5. Perform macro "on open" specific file- store macro in Personal Macro Workbook?
    By thompssc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2012, 12:38 PM
  6. lookup macro, solver macro, realtime macro
    By xelhelp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2011, 06:14 PM
  7. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 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