+ Reply to Thread
Results 1 to 6 of 6

Macro to look for cell value present in sheet 1 in sheet 2

  1. #1
    Registered User
    Join Date
    10-11-2019
    Location
    Prague, Czech Republic
    MS-Off Ver
    Office 365
    Posts
    16

    Macro to look for cell value present in sheet 1 in sheet 2

    Hello everyone.

    I'm stuck with this part of a macro I'm creating and really appreciate some help.

    I would need it to do the following:

    - Find if the value in the first visible cell after cell A1 in sheet 1 is present anywhere on sheet 2 (it can happen to have a filter and the cell after A1 being A9 i/o A2)

    - in the value is present on sheet 2, copy the active cells on the same row (for example, if the value is in cell A7, copy everything from A7 to M7)

    - after copying, I need it to paste the copied values on the original cell on sheet 1 (in this case paste in the first visible cell after cell A1)

    - after all this, I need it to loop until it gets to the first empty cell in Sheet 1, thus ending the macro.



    Hope you guys can help me just with these guidelines, as i'm having some trouble trying to attach a file.




    Thank you all in advance.

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Macro to look for cell value present in sheet 1 in sheet 2

    Please Login or Register  to view this content.
    but I dont understand your last sentence
    Last edited by nigelog; 12-04-2019 at 12:48 PM.

  3. #3
    Registered User
    Join Date
    10-11-2019
    Location
    Prague, Czech Republic
    MS-Off Ver
    Office 365
    Posts
    16

    Re: Macro to look for cell value present in sheet 1 in sheet 2

    Nigelog thank you for the code. I'll give it a try and let you know the result.

    As for my last sentence, sorry for the confusion, I meant attach an excel file on the post as an example of the data where i need to run the macro.

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Macro to look for cell value present in sheet 1 in sheet 2

    No this "- after all this, I need it to loop until it gets to the first empty cell in Sheet 1, thus ending the macro."

  5. #5
    Registered User
    Join Date
    10-11-2019
    Location
    Prague, Czech Republic
    MS-Off Ver
    Office 365
    Posts
    16

    Re: Macro to look for cell value present in sheet 1 in sheet 2

    Ah ok!

    I need it to then after checking one cell/ value, it checks the next one and performs the same actions.

  6. #6
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Macro to look for cell value present in sheet 1 in sheet 2

    If the data if filtered the next value will be the same if present

+ 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: 6
    Last Post: 02-06-2018, 02:36 AM
  2. [SOLVED] Vba code to color text in sheet 1 based on key words present in next sheet.
    By sapnawat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2018, 04:26 AM
  3. [SOLVED] how to change the color of a macro button based on a sheet being present or not
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-07-2016, 05:31 PM
  4. [SOLVED] Macro to mirror(copy) present sheet to new
    By Larbec in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 09-25-2015, 08:52 AM
  5. how to populate unique count in sheet 1 when the data is present in sheet 2.
    By Vishnu Balan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-28-2014, 11:20 PM
  6. [SOLVED] Macro for opening hyperlinks present in excel sheet in Mozilla or Chrome.
    By pari9485 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2013, 06:21 PM
  7. Copy Sheet & Create New Monthly Sheet From Present Sheet
    By unley in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2010, 12:00 PM

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