+ Reply to Thread
Results 1 to 11 of 11

Search Row for 2 Matches and Sum Collumn Below

  1. #1
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Search Row for 2 Matches and Sum Collumn Below

    Hi guys and gals,

    I have a PL that lists the 12 months of the year and the year itself.

    I want a formula that uses these values and searches Row1 in Revenue! and then returns the sum of the values below.

    I have made some notes in blue and given an example on the sheet attached.

    Thank you so much!

    Danny
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Search Row for 2 Matches and Sum Collumn Below

    Try this in D3:

    Please Login or Register  to view this content.
    Then copy to the other green cells. Is that what you're after?

    WBD
    Office 365 on Windows 11, looking for rep!

  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
    28,147

    Re: Search Row for 2 Matches and Sum Collumn Below

    Changed format of Forecast

    in D3

    =SUM(OFFSET(Revenue!$A$2,0,MATCH($C$2,Revenue!$A$1:$AA$1,0)+(D$1-1),9,1))

    in D4

    =D$3/SUM($D$3:$O$3)

    Suggest layout in "Revenue X" is better
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Search Row for 2 Matches and Sum Collumn Below

    Not sure where I am going with this question yet, but will your real life situation never have more than 2 years? And if the year starts in a non-January month will that be the case for all the years in the Revenue sheet?
    Dave

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,380

    Re: Search Row for 2 Matches and Sum Collumn Below

    worksheet name : Forecast

    Cell D3 formula , Drag right but Interval jump

    HTML Code: 

  6. #6
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Re: Search Row for 2 Matches and Sum Collumn Below

    Hi guys,

    Thank you very much for your help! I have a much larger sheet and I attempted to extract some of the data and make the file (Excel Help Forum.xlsx), but can see I wasn't clear enough (my apologies!). Unfortunately none of the above formulas work when the start month is a jon-January one.

    The 12-month forecast has the option to select a different start month, consequently meaning that some of the latter months will go over into the next year.

    I have now taken a snippet of the actual Workbook which should make it more clearer. For this example Month1 is May 2026. January to April is in the following year (2027).

    I have coloured the desired cells in green on the Forecast! sheet. They need to use the month in the cell directly above and the year two cells up and one to the right (eg. Month1/cell F17 = Month F16; Year G15).

    From the Revenue! sheet, you can see the Years and Months are all listed on row8 (big sheet), and I want the sum of the 50 rows below returned.

    If this is impossible to do on 1 line, I can always copy the year into the cells above every month (row7) and hide it in white font.

    Thank you all again.

    Danny
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    490

    Re: Search Row for 2 Matches and Sum Collumn Below

    TRY: =SUM(OFFSET(Revenue!$C$8,1,MATCH(F$16,Revenue!$D$8:$O$8,)+(G$15-Revenue!$C$8)*16,50))

  8. #8
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,380

    Re: Search Row for 2 Matches and Sum Collumn Below

    worksheet name : Forecast

    Cell F17 formula , Drag right but Interval jump
    Attached Files Attached Files
    Last edited by wk9128; 10-08-2021 at 07:59 AM.

  9. #9
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Re: Search Row for 2 Matches and Sum Collumn Below

    Thank you so much guys. It works like a charm!

    I've given you all the reputation you deserve!

    Before I close the ticket, I'd really appreciate one more formula which I'm sure you can do

    On Sheet Admin!, row2 has a long row of dates. I'd like the month and year to match the same cells as before (eg. Formula Month1/cell F17 = Month F16; Year G15).

    When the corresponding cell/date has been found with this month and year, I want the cell [in Admin!] one up and to the right (green bold % cells) returned. It can be returned as a number (not a percentage).

    This is for the orange coloured cell on the Forecast! sheet.

    If a new thread is required please let me know.

    Thank you once again,

    Danny
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    490

    Re: Search Row for 2 Matches and Sum Collumn Below

    I am not sure how you derive the pre-populated numbers.

    Is this what you're trying to achieve?
    =SUMPRODUCT((TEXT(A$2,"mmmm")=Forecast!$F$16:$AD$16)*(YEAR(A$2)=Forecast!$G$15:$AE$15)*Forecast!$F$17:$AD$17)

    But your data set is confusing to me.
    In your file Month 1 and Month 2 are now both called June.
    Too many hard plugs in my view which will make any inputs and outputs extremely error prone.

    Cheers

  11. #11
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Re: Search Row for 2 Matches and Sum Collumn Below

    Thank you Raul, perfect!

+ 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. Replies: 2
    Last Post: 06-15-2018, 11:43 AM
  2. search 2 criteria and if it matches give me the number of matches
    By sxch12 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-14-2017, 03:16 PM
  3. [SOLVED] How Can I: Search a Collumn in Other Document for Partial Text?
    By Sandcastle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-27-2015, 11:33 AM
  4. Search a table with multiple search inputs and return all matches
    By JDI in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-16-2014, 12:23 PM
  5. [SOLVED] Find a collumn in a dynamic sheet and select the entire collumn
    By Armand0 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2014, 11:20 AM
  6. Replies: 0
    Last Post: 08-11-2012, 03:25 PM
  7. search for non empty cells in a collumn and put a border on top
    By websqa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-07-2005, 06:01 PM

Tags for this Thread

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