+ Reply to Thread
Results 1 to 25 of 25

Newbie Help - IF, VLOOKUP, not sure which Formula to use

  1. #1
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Hi All,
    I only have a beginner level knowledge of Formulas and can't seem to find the right formula to perform the function I need - can you please advise which formula I should use.
    Attached is an example Workbook, there's 2 Worksheets ('Data Sheet' and 'Summary Sheet').
    I need the formula to populate data in the 'Summary Sheet'. The data is referenced from the 'Data Sheet'.
    In the 'Summary Sheet' I need to insert the 'Store Name' from Column A in the 'Data Sheet' IF the 'FY Date' in Column E = "FY24".
    If the formula doesn't detect "FY24" in Column E (for the whole Worksheet or Range Selection) then I don't want anything returned (I have 100+ Rows, and only want the 'FY24' Stores to be returned)
    The formula also needs to disregard 'Blank' Rows as there will be a few with the formatting of this Worksheet.

    Once this is done, I then need a Formula to do the following:
    IF a 'Store Name' is returned in the 'Summary Sheet' from the new Formula above, then insert that Stores 'Board Approved Date' from Column B and the 'Construction Start Date' from Column D' of the 'Data Sheet'.

    I'm sure there's a way for Excel to do this, but it's above my current Talent Levels.

    Thanks all, appreciate you taking the time to read and respond.

    Cheers,

    WB
    Formula Help Example.xlsx

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Please try in D2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Thanks Hans, really appreciate this - life saver !!

    Now, for me to try and understand this formula and how you've done this so I can use it in the future.

    I also only provided you a cut down version of my spreadsheet, so I'll have to play around with it to see if I can get it to work - which is fine because that'll allow me to learn.

    Thanks again.

    Cheers,

    WB

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Would you like it explaining?

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    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.

  5. #5
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Thanks Ali,
    I'm still trying to work it out at my end as the spreadsheet I gave was a smaller version of what I need.
    I've never seen a formula like this before, like I said, I'm a beginner with it all.
    If I can get it to work, I'll mark as resolved. I've also added Reputation as a thanks.
    Just found this website/forum from a quick Google Search, looks great.
    Cheers,
    WB

  6. #6
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    So do you want an explanation? I am offering to explain it in Hans' absence.

  7. #7
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Ok, so I'm struggling and just get #VALUE when I try and adjust the formula.
    Comments:
    - I've tried changing the Column Numbers to match my spreadsheet (The Board Approval Date is the 10th Column, not 3rd)
    - I've changed 'Col_Num 2' in the formula to '10' and I've referenced my own Worksheet (not the 'Data Sheet' as per the example) and it's still showing '#VALUE'

    I'm sure I'm doing something else wrong, but Yes Ali, if you can explain in more detail that would be great.

    Thank you.

  8. #8
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    OK - and yes, by the sounds of it, you are doing something wrong.

    =LET(t,CHOOSECOLS(FILTER('Data Sheet'!$A$6:$D$99,'Data Sheet'!$E$6:$E$99="FY24"),1,3,4),IF(t="","",t))

    LET allows us to set parameters:

    t,CHOOSECOLS(FILTER('Data Sheet'!$A$6:$D$99,'Data Sheet'!$E$6:$E$99="FY24"),1,3,4),

    t is made up of two parts:

    FILTER('Data Sheet'!$A$6:$D$99,'Data Sheet'!$E$6:$E$99="FY24") - this filters the array A6:D99 to rows in column E that contain FY24 (I suspect you need to make this array bigger for the real data)

    CHOOSECOLS(filtered_array,1,3,4) - from that filtered array above, we are extracting just columns 1, 2 and 4 - the columns relate to the array, so if the array started at column C, that would be column 1

    Finally, if the array returns a blank, we return a blank, otherwise we return the result of the array: IF(t="","",t) - changes 0 date values to a blank

    If you don't get the array right at the FILTER step, you won't get the results you want.
    Last edited by AliGW; 11-07-2023 at 01:47 AM. Reason: Typo fixed.

  9. #9
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    In the attached I've provided a breakdown of the results of each step in the formula before the final step. Does this help?
    Attached Files Attached Files

  10. #10
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    You are Welcome!

    Thanks for the feedback and rep . Glad to have helped.
    @Ali, thanks for providing a nice explanation.

  11. #11
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    The thread still needs marking as solved - I've had no acknowledgement from the OP of the help I've offered here yet - hopefully they won't just leave the thread hanging without.

  12. #12
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Hi Hans / Ali,
    Sorry, I’ve got a 2 week old and 2 year old at home and have only just been able to get back to emails after they both kicked off at home.
    I’m not in front of the PC, but I saw my error was in the Range Data just before I had to deal with the family, so I think I know where the problem is.
    I’ll jump onto this in the morning and report back.
    Thanks again for your help, great forum and appreciate how prompt you’ve both been (shame my young kids don’t seem to appreciate it .
    Cheers,
    WB

  13. #13
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Hi Hans / Ali,
    It was my Range Data, I've fixed that and now have the formula working - thank you !!!
    It's raised a few other questions, and I need to run a similar formula for different data (which I'll play around with).
    Newbie question, if I have similar questions about this topic / data should I ask them in here, or create a new Thread?
    I'll mark this as Solved as this seems important, I'm assuming we can still use the Thread once it's marked Solved?
    Cheers,
    WB
    Last edited by WinstonB; 11-07-2023 at 07:07 PM.

  14. #14
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    If it is the same question with a tweak, ask here, if it is similar or new, start a new thread with a good, descriptive title. Glad you got it sorted!

  15. #15
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Great, thanks Ali.
    Whilst this is more of a 'nice to have' I would like the Data that is populated by this Formula to keep the Headings used in my Table.
    For example, using the spreadsheet you uploaded, Store 4 should display under a Heading of 'Open' (refenced from Cell A4 in the 'Data Sheet'). Store 14 would have a Heading of 'Under Construction' and Stores 20-22 would have a Heading of 'Board Approved'.
    Whilst the current formula gives me what I need, it doesn't show what 'stage' the Stores are at, and given this data will continually change, I can't hard code these in.
    Is it possible to include the Headers some how??

    I've used the formula you provided to create multiple Summary Tables in my Worksheet, it's been fantastic and I can't thank you both enough so far.
    I also didn't know you could join formulas like you have !! Sure beats my standard =SUM =COUNTA and =COUNTIF formulas that I use !!

    Cheers,
    WB

  16. #16
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Provide a new version of the workbook with this mocked up. Your results table has headers, so I am not sure what you mean.

  17. #17
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Thanks Ali - see attached, example added to your spreadsheet.

    Cheers,
    WB
    ATTACH]848786[/ATTACH]
    Attached Files Attached Files

  18. #18
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Try this:

    =LET(t,CHOOSECOLS(FILTER('Data Sheet'!$A$4:$D$99,(('Data Sheet'!$E$4:$E$99="FY24")+('Data Sheet'!$E$4:$E$99=""))*('Data Sheet'!$A$4:$A$99<>"TOTAL")*('Data Sheet'!$A$4:$A$99<>"")),1,3,4),IF(t="","",t))

    You will get the headings regardless of whether there's data there or not, so have a play, but tweaking it further will be a bit trickier.

  19. #19
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Great, thanks Ali, will check it out later tonight - thanks again.

  20. #20
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Hi Ali / Hans,
    If I want to add another 'Filter' to the Formula, how do I do this:
    For example, I want the Formular to look for "FY24" as per the Formula you provided:
    =LET(t,CHOOSECOLS(FILTER('Data Sheet'!$A$6:$D$99,'Data Sheet'!$E$6:$E$99="FY24"),1,3,4),IF(t="","",t))
    but I also want it to look for "Approved" as well.
    So it'll only show the Stores that have "FY24" in one column and "Approved" in another column.
    Where and how do I add this extra Filter in?
    Thanks again.
    Cheers,
    WB

  21. #21
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Lik this (assuming that column F contains the word "Approved"):

    =LET(t,CHOOSECOLS(FILTER('Data Sheet'!$A$6:$D$99,('Data Sheet'!$E$6:$E$99="FY24")*('Data Sheet'!$F$6:$F$99="Approved")),1,3,4),IF(t="","",t))

    What about the formula in post #18? Have you abandoned that one?

  22. #22
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Thanks Ali,
    I'll give that a go.

    What does the '*' do in a Formula? I would have assumed it's a Multiply Function and would have caused an error?
    I'm assuming I can also add a 3rd or 4th Filter/Muliplier in should I need to? (I don't at this stage, but just trying to learn how I can structure this formula in the future)?

    I haven't given up on Post #18. I spent 15 mins on it the other night, couldn't get it to work and got side tracked with the young family. Then this issue has come up and I need to resolve it first. We get to #18 again shortly.

    Friday afternoon here in Australia, sending you a virtual glass of wine (bottle!) for your help, really appreciate it.

    Cheers,
    WB

  23. #23
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    It counts as an AND operator in a filter. If you replaced it with a + you'd have an OR operator instead.

    Yes, you can add more filters - each one in its own set of brackets.

    The attached includes the formula from post #18.

    0430 here - 0.0% beer or a click on the rep button will be fine for me - cheers!
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    11-06-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    12

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Great, I wondered what the difference would be if I used a +.

    I've tried to give you another Rep, but is says I need to spread it around before giving you another Rep (hard when this is the only post I've made).

    Cheers

  25. #25
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Newbie Help - IF, VLOOKUP, not sure which Formula to use

    Ah, well - never mind. Maybe next time. Thanks for trying!

    There's a + clause in the formula in the attachment - you can see both working together there.

    Each clause produces an array of TRUE/FALSE values: with *, you get the intersect where all columns = TRUE; with + you get all rows where any column = TRUE.

+ 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. VLOOKUP help - NEWBIE
    By scott.baxter87 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-10-2021, 06:59 AM
  2. Replies: 1
    Last Post: 03-17-2016, 03:51 PM
  3. Hi, newbie and a vlookup question
    By autotype in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2015, 08:21 AM
  4. VLOOKUP for a newbie
    By Kerfuffle76 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2013, 03:29 AM
  5. Newbie VLOOKUP question
    By GrayJ5 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-04-2013, 12:58 PM
  6. [SOLVED] Newbie needs help with VLOOKUP
    By FrankieDaFish in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-21-2012, 04:58 PM
  7. Worksheet VLookup Newbie Help
    By MCorr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-03-2006, 04:23 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