+ Reply to Thread
Results 1 to 4 of 4

Please help me to add an additional IF statement into this code.

  1. #1
    Registered User
    Join Date
    10-26-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    56

    Please help me to add an additional IF statement into this code.

    Hello!

    Can somebody please help me to amend this code to look for an additional IF? I found it on Google and modified it to my situation so I don't have a full understanding of how it is working.

    Currently C2 is a start date, D2 is an end date, E2 is the count of matches in the "Jobs" sheet within those dates where it searches column B for matches. I need to amend it so that not only does it check column B for the correct dates, but that it also checks column C for a specific set of text (F2) and ignores entries on the correct date with the wrong text in column C.

    Please Login or Register  to view this content.
    I hope this makes enough sense to understand.

    Thank you!

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Please help me to add an additional IF statement into this code.

    Did you try this?

    [Copy to clipboard]

    {=IF(ROWS(B$5:B5)>$E$2,"",INDEX(Jobs!A:A,SMALL(IF((Jobs!$B:$B>=$C$2)*(Jobs!$B:$B<=$D$2)*(Jobs!$C:$C<>$F$2),ROW(Jobs!A:A)-ROW(Jobs!$B$1)+1),ROWS(B$5:B5))))}
    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
    10-26-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Please help me to add an additional IF statement into this code.

    Thank you. The <> showed me everything BUT what I wanted so I changed it to = and it works exactly as I wanted. Thank you very much!
    Last edited by AliGW; 07-19-2019 at 02:56 AM. Reason: Please don't quote unnecessarily!

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Please help me to add an additional IF statement into this code.

    Oops - my mistake - I misread your requirement.

    Glad it helped, though.

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

+ 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. add additional IF statement then split sheets further...
    By yeders in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-25-2016, 10:09 AM
  2. [SOLVED] Modfication of Existing Code for additional additional cells
    By thilag in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-29-2016, 03:00 AM
  3. [SOLVED] If statement using contains with an additional qualifier
    By tisimp14 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2016, 01:32 PM
  4. [SOLVED] Additional IF Statement - Help!
    By mack_76 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-27-2015, 07:06 AM
  5. [SOLVED] Multiple IF statement with additional requirements
    By Clash in forum Excel General
    Replies: 3
    Last Post: 11-01-2012, 10:35 AM
  6. Adding additional criterial to statement
    By rhudgins in forum Excel General
    Replies: 2
    Last Post: 03-14-2011, 04:50 PM
  7. Adding additional IF statement
    By rhudgins in forum Excel General
    Replies: 1
    Last Post: 04-13-2010, 04:59 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