+ Reply to Thread
Results 1 to 6 of 6

Offset with criteria query

  1. #1
    Registered User
    Join Date
    08-18-2020
    Location
    London
    MS-Off Ver
    10
    Posts
    2

    Offset with criteria query

    Hi,
    This is my first post, so please excuse any etiquette failings.
    I have a spreadsheet that uses the value in cell (A1) and (P1) (on summary sheet) and then via some x-lookup's populates cells (B:F) with various values (amount, inv number, date etc.) which works fine.

    However, if there is more than one result I need to run the same search ignoring the above result and return values across cells (G:J). And again, if there is a third result, I need to do it again and return values across cells (K:N) and so on. To do this I'm using OFFSET to move the search down 1 row, but unfortunately although this brings me the data ok, it's not taking in to account the condition in cell (P2).

    For example when searching PO12345 in Jun, I'm getting 5 results, but two of them is actually dated July and the 5th result is showing a date of 00/01/1900.

    Can anyone suggest how I can add a condition that states if the period (P2) isn't matched, then the value is zero if all fields?

    I also need to add a billed in period, billed to date and balance available, but think I can do this via IF and AND?


    Any suggestions appreciated.
    Thanks
    Attached Files Attached Files

  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,830

    Re: Offset with criteria query

    Welcome to the forum.

    P2 where? The data in the workbook does not seem to match what you are describing.

    However, in principle:

    =IF(formula<>P2,"",formula)
    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
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Offset with criteria query

    I preferably choose simple pivot table.
    I have do some remove rows & make pivot table.
    Plz look pivot sheet.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  4. #4
    Registered User
    Join Date
    08-18-2020
    Location
    London
    MS-Off Ver
    10
    Posts
    2

    Re: Offset with criteria query

    HI Ali,
    So sorry, I added some columns for the additional results to pull through and forgot to update in my post that the cell is X2 (i.e. this is the date toggle cell which when selected affects part of the criteria for the formulas in columns C, G, K, O AND S (e.g. the invoice number results)
    Apologies for the confusion

  5. #5
    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,830

    Re: Offset with criteria query

    If you still need help, please post updated instructions that match the sample workbook. If not, please mark the thread as solved.

  6. #6
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Offset with criteria query

    Are you refering my #3 post.

+ 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. Query criteria not filtering query
    By FernTurpin in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-29-2018, 05:34 PM
  2. [SOLVED] sum if to infinity where the criteria is one row offset from the criteria range
    By Travisty in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-12-2017, 09:57 PM
  3. Adodb Query with Offset?
    By nicholas.phillips in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-15-2014, 06:08 PM
  4. [SOLVED] Index Match Offset Query
    By Excel Dumbo in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-04-2013, 09:26 PM
  5. [SOLVED] How to offset a vlookup query by x columns to the left
    By datthed in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-29-2012, 01:25 PM
  6. Query criteria based of other query data
    By jik_ff in forum Access Tables & Databases
    Replies: 6
    Last Post: 03-12-2012, 05:26 PM
  7. VBA Web Query Macro, Offset Multiple Rows Looping
    By huey in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-30-2009, 06:42 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