+ Reply to Thread
Results 1 to 14 of 14

I want to lookup data in other sheets and put them each in a seperate row in the same col

  1. #1
    Registered User
    Join Date
    12-05-2022
    Location
    Cairo, Egypt
    MS-Off Ver
    2021
    Posts
    20

    I want to lookup data in other sheets and put them each in a seperate row in the same col

    Hello Everyone,

    I wanted to ask if a certain Excel task can be done with normal functions or it must be done with VBA

    I want in this sheet to write in cell B2 to Check the value in A2 and finds any similar value in Column L in both "Sponsors" and "School" Sheet and return the value of the corresponding cell in column Q in either sheets and if the cell in column Q is empty then take the corresponding value in column P and if there are multiple values for the same entry(value in column A) then i want it to be placed each in a seperate row in the same column that i will type the function in.

    P.S: I've attached the Excel file

    Hopefully you can help me,
    Thanks!

    2023 Sponsor data (4) (1) (2).xlsx
    Last edited by AhmedWaleed225; 11-25-2023 at 07:55 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    84,036

    Re: Need help with certain task

    Administrative Note:

    There is NO 2022 Excel product - what do you have? This is important.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to consider amending your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Guideline #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-05-2022
    Location
    Cairo, Egypt
    MS-Off Ver
    2021
    Posts
    20

    Re: Need help with certain task

    Thanks AliGW, I've edited the title as i could to explain what i want in general and I've edited the Microsoft office version in my account

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    84,036

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    Thanks. I am afraid I'm not following what you want - hopefully someone else will.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    What do you expect to see? Where do you expect to see it? Which sheet am I supposed to be looking at?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    If it is Collected data.. what is the existing formula doing incorrectly? What are the expected answers?

  7. #7
    Registered User
    Join Date
    12-05-2022
    Location
    Cairo, Egypt
    MS-Off Ver
    2021
    Posts
    20

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    Hey Glenn,

    In the "Collected Data" Sheet, I want to put the function in cell B2 so it would take the value in A2 and then goes and find any identical values of (A2) in sheets "Sponsors" and "School" and search Column L to find the identical values then return to the B2 cell the corresponding value in column Q and if Q is empty then Column P

    P.S: I've actually managed to do so using this formula:
    =IFERROR(IF(ISBLANK(VLOOKUP(A2, Sponsors!L:Q, 6, FALSE)), VLOOKUP(A2, Sponsors!L:P, 5, FALSE), VLOOKUP(A2, Sponsors!L:Q, 6, FALSE)), IFERROR(IF(ISBLANK(VLOOKUP(A2, School!L:Q, 6, FALSE)), VLOOKUP(A2, School!L:P, 5, FALSE), VLOOKUP(A2, School!L:Q, 6, FALSE)), ""))

    but my problem is when i there are values which have more than one value in the other 2 sheets (I've left a row for each value in the Collected data sheet) but it just puts the 1st value and ignores the rest so i am asking if there is an edit to this function so it would just put each one in a seperate row in the same column (B)

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    Please amend your file to show at least ONE example where your current formula DOES NOT work... and tell us what the correct answer is.

  9. #9
    Registered User
    Join Date
    12-05-2022
    Location
    Cairo, Egypt
    MS-Off Ver
    2021
    Posts
    20

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    Hey Glenn, Here is the file i am talking about see in the Collected Data sheet Column B there are 3 cells with Chris while i want it to out put Chris and Sarah and Peter (Taken from Sponsors Sheet) each in a row for UG1555
    2023 Sponsor data (4) (1) (2) (1).xlsx

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    Transform Sponsor & Schools data to structured tables (Called Sponsor and School....). These will adjust automatically if/when new lines are added.

    Delete expected results from columns A & B.

    A2:
    =LET(A,ROWS(Sponsor),B, ROWS(School),C,SEQUENCE(A+B),IF(C<= A,INDEX(Sponsor, C,12),INDEX(School,C-A,12)))

    B2:
    =LET(A,ROWS(Sponsor),B, ROWS(School),C,SEQUENCE(A+B),IF(C<= A,INDEX(Sponsor, C,17),INDEX(School,C-A,17)))

    results spill down as far as needed.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-05-2022
    Location
    Cairo, Egypt
    MS-Off Ver
    2021
    Posts
    20

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    Thanks Glenn, That worked with the current data but I faced a problem when i tried adding a new row in the Sponsors sheet or School sheet, It gives me a #Spill Error ("A cell we need to spill data into isn't blank")

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    To repeat:

    Delete expected results from columns A & B.

    Do that and it works fine. I may not have deleted far enough down in my posted file.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-05-2022
    Location
    Cairo, Egypt
    MS-Off Ver
    2021
    Posts
    20

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    Yes, I am really sorry, It works fine now.

    Thanks a lot Glenn, Appreciate your help.

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: I want to lookup data in other sheets and put them each in a seperate row in the same

    It was my fault... for not deleting a sufficient number of rows of your older formulae...

+ 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: 0
    Last Post: 03-14-2021, 04:26 PM
  2. Replies: 4
    Last Post: 01-06-2020, 11:38 AM
  3. Replies: 3
    Last Post: 12-31-2019, 01:46 PM
  4. [SOLVED] Pivot Chart: Task spend over time, +comparison w/ Task Budget
    By mike_302 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 12-28-2018, 04:21 PM
  5. export excel list of task in custom outlook task 2010.
    By maxseal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2014, 03:51 PM
  6. [SOLVED] IF contingent task closed, THEN change formatting of dependent task cell
    By tek_9 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-29-2012, 08:40 PM
  7. [SOLVED] dialog box for active cell task to speed repeditive task
    By Todd F. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2005, 10:05 AM

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