+ Reply to Thread
Results 1 to 12 of 12

Vertical search? several conditions... problem

  1. #1
    Registered User
    Join Date
    04-01-2015
    Location
    Mlawa
    MS-Off Ver
    13
    Posts
    19

    Vertical search? several conditions... problem

    Hello,

    I need some help... In worksheet "Table" I need formula for B & E columns. I need to know which "Part No" was produce in some day between ex. 01:00 - 02:00 and how much. I know that sometimes there will be two or more different Part No. in column B (in this case should be error #N/D! - there is no problem I will ignore that).

    2633d28ea66c43ebgen.jpg

    In the attachment file.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vertical search? several conditions... problem

    Hi,

    I fear you're not going to get very far with this until you split the column V times from the dates.
    Once you have proper date and time numbers in individual columns then it's relatively easy to analyse.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,879

    Re: Vertical search? several conditions... problem

    Try this in B3

    =IFERROR(INDEX(Data!$F$2:$F$14000,SMALL(IF((Data!$M$2:$M$14000=Table!$A3)*(INT(Data!$V$2:$V$14000)=INT(Table!$C3))*(MOD(Data!$V$2:$V$14000,1)>=TIMEVALUE(LEFT(Table!D3,5)))*(MOD(Data!$V$2:$V$14000,1)<=TIMEVALUE(RIGHT(Table!D3,5))),ROW(Data!$F$2:$F$14000)-ROW($F$2)+1,""),1)),"")

    Enter with Ctrl+Shift+Enter

    Assumes only ONE part

  4. #4
    Registered User
    Join Date
    04-01-2015
    Location
    Mlawa
    MS-Off Ver
    13
    Posts
    19

    Re: Vertical search? several conditions... problem

    Hello Richard,

    In the attachment corrected file (seperated date and time.

    JohnTopley,
    It does not working. I copied formula then used ctrl+alt+entere and returned error.

    Regards,
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Vertical search? several conditions... problem

    What you need to understand about dates and times in excel is...

    a date is just a number representing the number of days passed since 1/1/900...and then formatted in a way that we recognize as a date. So, for instance, today (Tue Dec 2016) is actually 42724

    Time is actually a decimal part of 1 (day), so 06:00 AM is 0.25, 12 noon is 0.5 and 18:00 (or 6 PM) is 0.75

    So, having said that, as soon as you combine 2 times to for a range, like you have in your 2nd file (00:00 - 01:00), you have created a text cell, it is no longer time

    It looks like you are dealing with 1-hour brackets, so why not just use the 1st hour?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,879

    Re: Vertical search? several conditions... problem

    This is my original ...
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-01-2015
    Location
    Mlawa
    MS-Off Ver
    13
    Posts
    19

    Re: Vertical search? several conditions... problem

    Hello JohnTopley,

    But there is empty Q'ty (column E)...

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,879

    Re: Vertical search? several conditions... problem

    This in column E

    in E3

    =IFERROR(INDEX(Data!$N$2:$N$14000,SMALL(IF((Data!$M$2:$M$14000=Table!$A3)*(INT(Data!$V$2:$V$14000)=INT(Table!$C3))*(MOD(Data!$V$2:$V$14000,1)>=TIMEVALUE(LEFT(Table!$D3,5)))*(MOD(Data!$V$2:$V$14000,1)<=TIMEVALUE(RIGHT(Table!$D3,5))),ROW(Data!$F$2:$F$14000)-ROW($F$2)+1,""),1)),"")

    Enter with Ctrl+Shift+Enter

    Copy down

  9. #9
    Registered User
    Join Date
    04-01-2015
    Location
    Mlawa
    MS-Off Ver
    13
    Posts
    19

    Re: Vertical search? several conditions... problem

    Working but I need sum during that period (ex. 6:00 - 7:00)
    Last edited by AliGW; 12-21-2016 at 05:28 AM. Reason: Extraneous quotation removed.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,994

    Re: Vertical search? several conditions... problem

    Seeboo - please don't quote whole posts - it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding

    For normal conversational replies, try using the QUICK REPLY box below, or edit out unnecessary content before posting. Thanks.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,879

    Re: Vertical search? several conditions... problem

    Qty

    =SUMPRODUCT((Data!$N$2:$N$14000)*(Data!$M$2:$M$14000=Table!$A3)*(INT(Data!$V$2:$V$14000)=INT(Table!$C3))*(MOD(Data!$V$2:$V$14000,1)>=TIMEVALUE(LEFT(Table!$D3,5)))*(MOD(Data!$V$2:$V$14000,1)<=TIMEVALUE(RIGHT(Table!$D3,5))))
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,879

    Re: Vertical search? several conditions... problem

    Using your updated file:

    in B3

    =IFERROR(INDEX(Data!$F$2:$F$14000,SMALL(IF((Data!$M$2:$M$14000=Table!$A3)*(Data!$V$2:$V$14000=Table!$C3)*(Data!$W$2:$W$14000 >= TIMEVALUE(LEFT(Table!$D3,5)))*(Data!$W$2:$W$14000 <= TIMEVALUE(RIGHT(Table!$D3,5))),ROW(Data!$F$2:$F$14000)-ROW($F$2)+1,""),1)),"")

    Enter with Ctrl+Shift+Enter

    in E3

    =SUMPRODUCT((Data!$N$2:$N$14000)*(Data!$F$2:$F$14000=$B3)*(Data!$V$2:$V$14000=$C3)*(Data!$W$2:$W$14000 >= TIMEVALUE(LEFT($D3,5)))*(Data!$W$2:$W$14000 < TIMEVALUE(RIGHT($D3,5))))
    Attached Files Attached Files

+ 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. [SOLVED] Counting horizontal and vertical cells based on two conditions
    By ChrisP80 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-15-2015, 04:01 PM
  2. Counting horizontal and vertical cells based on two conditions
    By ChrisP80 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-15-2015, 10:10 AM
  3. [SOLVED] Looking for a date for a given 3 conditions in vertical columns
    By thilag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-26-2015, 11:31 AM
  4. [SOLVED] Lookup with THREE conditions: one vertical, two horizontal
    By splendidus in forum Excel General
    Replies: 7
    Last Post: 08-05-2014, 01:11 PM
  5. [SOLVED] Using Index & Match to search 2 vertical columns and return data to a vertical set
    By QuietLife in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-08-2013, 09:59 AM
  6. Vertical to Horizontal Data Special Conditions
    By guypier in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-05-2011, 03:30 PM
  7. Replies: 2
    Last Post: 04-06-2011, 10:08 AM

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