+ Reply to Thread
Results 1 to 3 of 3

How to fetch specific data from other sheet using macro?

  1. #1
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    How to fetch specific data from other sheet using macro?

    Hi all,

    Hope all are well.

    1 help please


    In Serialisation PR Records file, in sheet DM Records, Column C will contain same number as in Column B in Serialisation - DM Report 2023 file. Based on this common data in the columns, column O, U and V in Serialisation PR Records file shall be fetched from Serialisation - DM Report 2023 file.


    Note 1:

    Both the files will have same file names and will be open while running macro.

    Macro is required in Serialisation PR Records file


    Where in Serialisation PR Records file,

    Number under Column C is available under Column B in Serialisation - DM Report 2023 file with below conditions:

    Column G = TSCO REQ

    Column I = Complete Notification & Inform Requestor

    Then,

    1. Column U in Serialisation PR Records file shall show as "Completed", else "Pending"


    2. Column O in Serialisation PR Records file shall be fetched from Column K in Serialisation - DM Report 2023 file


    3. Column V in Serialisation PR Records file shall be fetched combined from Column N and O in Serialisation - DM Report 2023 file and populated in the below format (FYI: columns N and O in actual will be hidden)

    23-01-2023 10:38:07 AM


    Note2:

    Column V in Serialisation PR Records file shall might give a problem since it automatically captures timestamp based on below macro. This auto timestamp is required only when data is selected in Column N thus capturing timestamp its in column Q while all other columns are to be removed from below macro.

    Please Login or Register  to view this content.

    Note3:

    Sheet PR Records contains CF and sheet DM PR Availability contains formulae with respect to sheet DM Records. Hope they run perfectly, else i will be doomed


    Pass: Abc@123


    Can someone please help
    Last edited by rizwanulhasan; 03-31-2023 at 11:40 AM.

  2. #2
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    Re: How to fetch specific data from other sheet using macro?

    Previous files to be ignored.

    Sorry i guess the task is bit challenging but can someone respond

    I was wondering if this can be done using XLOOKUP, but it didnt workout



    To simplify my requirement, let me reiterate:

    Note:

    Both the files will have same file names and will be open while running macro.

    Macro is required in Serialisation PR Records file.



    In Serialisation PR Records file, 3 columns are to be populated from Serialisation - DM Report 2023 file i.e. Columns I, N and O.


    1st check:


    If value under Column B (DM No.) in Serialisation PR Records file is found in Serialisation - DM Report 2023 file.


    If yes, then this value (DM No.) will appear altleast 5 times in Serialisation - DM Report 2023 file.


    1. Column I in Serialisation PR Records file shall be fetched from Column K in Serialisation - DM Report 2023 file where the value against the respective DM No. in Column I is "Perform Independent Check".

    Row highlighted in yellow.


    2. Column N in Serialisation PR Records file shall show as "Completed", if the value against respective DM No. in Column G is "TSCO REQ", else "Pending".


    Row highlighted in yellow shows as TSOS REQ, hence value in Column U in Serialisation PR Records file is PENDING. Also, since its pending, Column O should be blank.


    3. Column O in Serialisation PR Records file shall be fetched combined from Column N and O in Serialisation - DM Report 2023 file if the value against DM No. in Column G is "TSCO REQ".

    Date to be populated in the below format (FYI: columns N and O in Serialisation - DM Report 2023 file will be hidden)

    23-01-2023 10:38:07 AM


    Row 154 in Serialisation PR Records file highlighted in green matches all conditions with row 20 in Serialisation - DM Report 2023 file, hence it shows as Completed and shows the date and time.

    Pass: Abc@123

    Can someone please help
    Last edited by rizwanulhasan; 03-31-2023 at 01:04 PM.

  3. #3
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    Re: How to fetch specific data from other sheet using macro?

    Sorry but just wanted to check if this requirement is possible

    I guess it needs VLOOKUP which can handle 2 criteria. But i am unsure if excel has that feature

+ 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. Help on macro to fetch data from one sheet and post on the other
    By preond in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2016, 09:15 AM
  2. Macro to fetch data from one sheet to another
    By Nirmall in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2015, 04:55 AM
  3. macro to loop through data sheet , fetch 8 rows at a time and put in new sheet
    By nyree in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-04-2015, 01:46 AM
  4. Replies: 7
    Last Post: 04-01-2015, 05:40 PM
  5. Need a macro to fetch data from different sheets and club into one sheet.
    By sam190 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2013, 03:27 AM
  6. macro to fetch specific column data from other sheets to a mainsheet
    By PhAnT0M in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2012, 01:33 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