+ Reply to Thread
Results 1 to 5 of 5

According to fuzzy query and select this month plus the sum of the previous month

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-25-2020
    Location
    Taiwan
    MS-Off Ver
    MS 365+win 10(64bit)
    Posts
    208

    According to fuzzy query and select this month plus the sum of the previous month

    example

    When P1 selects the month, the A column should correspond to the G column, and the sum of the month P1 plus the previous month should be counted.

    Cell P2 result should be =SUM(K2,K3,J2,J3)

    Any help would be appreciated!
    Attached Files Attached Files
    Last edited by metrostar; 10-11-2022 at 08:34 PM.

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: According to fuzzy query and select this month plus the sum of the previous month

    Try this in P2. You can use the logic in this one for the remainder of the yellow highlighted cells.
    =SUM(OFFSET(A2,0,MATCH($P$1,$B$1:$M$1,0)),OFFSET(A3,0,MATCH($P$1,$B$1:$M$1,0)),OFFSET(A2,0,MATCH($P$1,$B$1:$M$1,0)-1),OFFSET(A3,0,MATCH($P$1,$B$1:$M$1,0)-1))
    Happy with my advice? Click on the * reputation button below

  3. #3
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    4,011

    Re: According to fuzzy query and select this month plus the sum of the previous month

    Cell P2 formula , Drag down

    Formula: copy to clipboard
    =SUM(SUMIF(A:A,"*"&$O2&"*",OFFSET(A:A,,MATCH(P$1,$B$1:$M$1,)+{-1;0})))

  4. #4
    Forum Contributor
    Join Date
    08-25-2020
    Location
    Taiwan
    MS-Off Ver
    MS 365+win 10(64bit)
    Posts
    208

    Re: According to fuzzy query and select this month plus the sum of the previous month

    Thank you @Crooza , your formula doesn't do what I want

    @wk9128 you are amazing, just what i wanted, thank you

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    4,011

    Re: According to fuzzy query and select this month plus the sum of the previous month

    @metrostar You're Welcome. Glad to help . Thank You for the feedback.

+ 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] Need formula to calculate days used in month initiated in previous and selected month
    By Ochimus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-14-2021, 05:54 AM
  2. [SOLVED] Macro for selecting employees that have an amount > 1000 this month w.r.t. previous month
    By MaartenRo in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 07-03-2020, 05:27 AM
  3. VBA code adjustment to include only current month and previous month automatically.
    By ElmerFud in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-05-2015, 03:02 PM
  4. Macro using vlookups comparing 2 months paysheet(previous month and current month)
    By srinivasan1965 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-07-2012, 03:45 AM
  5. [SOLVED] VBA to identify the current month and previous month based on system date
    By ravikumar00008 in forum Excel General
    Replies: 10
    Last Post: 07-26-2012, 10:04 AM
  6. Replies: 4
    Last Post: 03-19-2012, 08:58 AM
  7. Excel 2007 : Pivot table % of previous month query
    By SteveW68 in forum Excel General
    Replies: 1
    Last Post: 04-08-2010, 02:18 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