+ Reply to Thread
Results 1 to 18 of 18

Find text and calculate according to Month

  1. #1
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Find text and calculate according to Month

    Hi,

    I have a workbook that has a drop down list option for each name.

    What I'm trying to achieve is to create a summary of what was given to each name according to Months.

    But the preferred way to put the dates is according to number of weeks. As we all know that some months may start at the middle of the week.

    I need to create a summary for each individual.

    Say Name 1 have a total of 5 Hol in Jan, Name 2 have a total of 3 Hol in Jan and so on.

    Find function is perfect but how can I make sure that the required falls on a Month instead of Week to each individual?

    Any help is appreciated and thank you very much in advance.

    I have my Workbook attached.
    Attached Files Attached Files

  2. #2
    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
    52,933

    Re: Find text and calculate according to Month

    You give no data to work with, and show no expected outcome? It would help if you provides these, please - that way we have an idea of what you expect.
    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

  3. #3
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi,

    Thank you.

    I have attached the workbook with data of what I am trying to achieve.

    I manually enter the number of Holidays to each month on a Summary sheet by getting the data from the week's sheet.

    The summary should calculate the number of Holidays. The problem I have is, the data where I get them is on a week's format which an end date of the month will be followed by the start date of the new month, please see Week 13-16 Sheet (name 1) where March 31 is followed by April 1 and they both fall on Week 13 of the year.

    Instead of manually entering a total of Holidays on the Summary Sheet (name 1), it will automatically add up all the Holidays as they entered by the user.

    I hope this makes sense. And again thank you very much.
    Attached Files Attached Files

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

    Re: Find text and calculate according to Month

    First change the name of the worksheet as below
    Week 1 - 4 >>>> Jan
    Week 5-8 >>>> Feb
    Week 9-12 >>>> Mar
    Week 13-16 >>>> Apr

    Seond change the name as below (Because EXCEL is not smart, can't distinguish colors and have the same name unless use VBA code)
    name 1
    name 2
    name 3
    name 4
    name 5


    worksheet name : Summary
    cell C6 formula , Drag down and accross

    HTML Code: 
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi wk9128,

    Thank you.

    But just wondering the result doesn't change when I enter data.

    Tried to change few things in the formula but can't get it.

  6. #6
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi,

    I got it. The only error now I'm getting is not giving me a correct total sum of HOL.

    What I wonder what I'm missing.

    Thank you.

  7. #7
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi,

    I think what happened here is data are being captured according to by month. But what I'm trying to achieve is the same in exception of the Month to Month. What I'm trying to achieve is from Weeks going to Month.

    I need to calculate the HOL given on a specific date captured from the formatted weeks and bring the result to a summary but grouped in Months.

    Thank you.

  8. #8
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi,
    Should a Match formula work in here? Any thoughts please. I’m really lost in this one. Appreciate your help. Thank you

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Find text and calculate according to Month

    First, change sheet name to Jan, Feb,...(3 letters format)
    Sheet summary row 4 is months Jan, Feb,...(3 letters format)
    All 12 sheets of month have same margin (Week1 to 4 tables are put in same row, column index).
    C6:
    Please Login or Register  to view this content.

    For specific month, i.e, Feb, there are 5 SUMPRODUCTs which:
    1st, count feb days in week 4 of previous month Jan
    2nd, count feb days in week 1 of feb
    3rd, count feb days in week 2+3 of feb
    4th, count feb days in week 4 of feb
    5th, count feb days in week 1 of next month Mar.
    Attached Files Attached Files
    Quang PT

  10. #10
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi,

    Thank you very much for giving time to share your knowledge.

    It is quite a complex formula I should say and thank you for that. May I ask please, the month of July and August is not giving me a correct calculation unlike the months of Jan to Jun.

    I'm not sure which area of the formula needs changing, I have tried moving around some but nothing seems to work.

    Thank you.

  11. #11
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Find text and calculate according to Month

    Quote Originally Posted by sickreto View Post
    the month of July and August is not giving me a correct calculation unlike the months of Jan to Jun.
    Quote Originally Posted by bebo021999 View Post
    First, change sheet name to Jan, Feb,...(3 letters format)
    Sheet summary row 4 is months Jan, Feb,
    Are you using July and August? make sure months is both sheets are the same (Jul,Aug...with 3 letters)

  12. #12
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi,

    Yes. I'm using the 3 letters to all months names on all sheets. Anything else I'm missing?

    It's giving results but it's capturing both months. Say Jun 30 and Jul 1, they are in the same week, so if I put HOL then it gives me a total of 2 rather than 1 one ache month( 1 Jun and 1 for Jul).

    Thank you.
    Last edited by sickreto; 06-09-2021 at 08:16 AM.

  13. #13
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Find text and calculate according to Month

    Upload the file again with the issue

  14. #14
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi,

    I have attached the file where I have filled the end of Jun and early Jul with Summary having for Jul only and none for Jun.

    Also at the end of Dec I can't add more due to Dec being taken already as a name in the sheet, because of this I can't add the last few weeks of the year. Any advise please??

    Thank you very much.
    Attached Files Attached Files

  15. #15
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Find text and calculate according to Month

    Every month's days are fixed with 4 weeks * 7 = 28 days.

    Then Jun ends with 20-Jun

    Then 1st week of Jul is from 21-27-Jun-21 (???)

    and Dec, 1st 3 weeks belong to Nov, and Dec end with 5-Dec.

  16. #16
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    Hi,

    Yes. As I need to go along by Weeks of the Year rather than Months then calculating in a Summary sheet the Totals according to Months. Sorry if I have confuse you.

    According to 2021 Calendar the 1st week of the year is Jan 4 so when I put in Week 1 then it will start on Jan 4 2021 then it will continue along as I put in by Weeks number. Then I created a Summary where it will capture all HOL in total but gathering all of those data (HOL) according to Month.

    Hope this make sense. I'm open for other approach on this one.

    Thank you.

  17. #17
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Find text and calculate according to Month

    Is it possible to arrange week# come accross columns like this:
    If not, VBA may be a good choice.
    Attached Images Attached Images

  18. #18
    Forum Contributor
    Join Date
    07-28-2015
    Location
    london
    MS-Off Ver
    Microsoft Office 365
    Posts
    113

    Re: Find text and calculate according to Month

    There's no image attached. I'm willing to try all other ways.

+ 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] Calculate a YTD Total based on Reporting Month and Week of Month via drop down selections
    By Miskondukt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-02-2018, 05:14 PM
  3. [SOLVED] Find a month in text and display that in next column
    By Felix212 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-25-2018, 04:34 AM
  4. Macro to calculate Month to year sales based on month selection
    By chandu356 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-14-2017, 09:58 AM
  5. [SOLVED] Macro to find, replace text and calculate VAT in a cell
    By elgato74 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-26-2014, 07:33 AM
  6. [SOLVED] How to find the 'next month' given a starting month as text?
    By thetalldude in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-22-2014, 04:47 AM
  7. Find text in a column and calculate numbers in the same row
    By fabianzetterberg in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-09-2013, 09:44 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