+ Reply to Thread
Results 1 to 8 of 8

Match Month and Year and Return Collumn to Right

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

    Match Month and Year and Return Collumn to Right

    Hi there,

    I have a table of revenues for each month, listed month1, month2, month3, etc.

    I want to reorgansise the revenues in a monthly calendar. The formula will match the month and year in the new table and return one cell to the right.

    I have put some notes in blue on the sheet for your reference.

    Thank you!

    Danny
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Match Month and Year and Return Collumn to Right

    I'm sure there must be better ways, but you can put this formula in B15:

    =SUMIFS(INDEX($C$2:$J$10,MATCH($A15,$A$2:$A$10,0),0),INDEX($B$2:$I$10,MATCH($A15,$A$2:$A$10,0),0),">="&DATE($A$14,COLUMNS($B:B),1),INDEX($B$2:$I$10,MATCH($A15,$A$2:$A$10,0),0),"<"&DATE($A$14,COLUMNS($B:B)+1,1))

    Apply your Custom Format, then copy across and down to fill your second table.

    Hope this helps.

    Pete

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

    Re: Match Month and Year and Return Collumn to Right

    Hi Pete,

    I really appreicate your help.

    I actually have a much larger sheet I am working on and extracted the tables that I wanted help with. I have tried to edit your fomula (which runs over 2 sheets) to no avail.

    My apologies to ask for your help again, but can you edit the formula where the source table is on sheet Admin and the result calendar is on sheet Revenue.

    I have attached a new file for your reference.

    Thank you Pete,

    Danny
    Attached Files Attached Files

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Match Month and Year and Return Collumn to Right

    Try below formula in B2, Copy and paste across
    =SUMPRODUCT(INDEX(Admin!$C$2:$I$10,MATCH($A2,Admin!$A$2:$A$10,0),)*(TEXT(INDEX(Admin!$B$2:$H$10,MATCH($A2,Admin!$A$2:$A$10,0),),"MMMMYYYY")=B$1&$A$1)*(LEFT(Admin!$B$1:$H$1,5)="MONTH"))
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Match Month and Year and Return Collumn to Right

    Please try at B2

    =SUMIFS(Admin!$C2:$Z2,Admin!$B2:$Y2,">="&B$1&2022,Admin!$B2:$Y2,"<"&EDATE(B$1&2022,1))
    Attached Files Attached Files

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Match Month and Year and Return Collumn to Right

    Here's my formula, amended to take account of two sheets and different cell references - put this in B2 of the Revenue sheet:

    =SUMIFS(INDEX(Admin!$C$2:$J$10,MATCH($A2,Admin!$A$2:$A$10,0),0),INDEX(Admin!$B$2:$I$10,MATCH($A2,Admin!$A$2:$A$10,0),0),">="&DATE($A$1,COLUMNS($B:B),1),INDEX(Admin!$B$2:$I$10,MATCH($A2,Admin!$A$2:$A$10,0),0),"<"&DATE($A$1,COLUMNS($B:B)+1,1))

    then copy across and down as required.

    Hope this helps.

    Pete

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

    Re: Match Month and Year and Return Collumn to Right

    That's wonderful guys. Thank you so much!

    Danny

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Match Month and Year and Return Collumn to Right

    You have 3 different solutions to choose from now. Thanks for marking the thread as Solved.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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: 4
    Last Post: 09-04-2020, 04:02 PM
  2. Replies: 13
    Last Post: 01-29-2018, 03:42 PM
  3. [SOLVED] Need a forumla to look at a year and month and return a 1 if match found
    By john dalton in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-03-2014, 07:11 AM
  4. Return value of the last week of the month based on the year and month
    By stevekho2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-14-2013, 11:04 AM
  5. Replies: 6
    Last Post: 06-25-2012, 07:12 AM
  6. Type in Month-Year and return 3rd wednesday of month
    By learntheweek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2010, 11:29 AM
  7. Formula to return last day of month for each month in year?
    By StargateFan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-03-2006, 12:10 AM

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