+ Reply to Thread
Results 1 to 8 of 8

Based on three values in one sheet calculate number

  1. #1
    Registered User
    Join Date
    08-06-2019
    Location
    Karlsruhe, Germany
    MS-Off Ver
    Office 365
    Posts
    24

    Based on three values in one sheet calculate number

    Hey guys,
    I have a following problem. I hope somebody can help.

    Please look into my attached file. It looks a bit weird because I removed sensible data by just removing the information in the cells.

    On the sheet called "test" I have a table. (The file in the attachments called table1)
    I have another sheet, the one called ADB, where I have three imporant columns. These are

    - Date of training
    - Status
    - Planned cost

    in the "test" sheet you can see cells with the value "#WERT!" . In those cells I want to have costs calculated.
    So, let's say if in the ADB-sheet in one row the Date of the Training was in October 2019 and the Status is "3 Ordered" and e.g. the cost is 100€, then I want it
    to be added to the cell-value of the test-sheet under the column Okt and in the row "Plan". If there is another row in the ADB-Sheet with the same properties then I want the costs of that one added to the 100€ of before etc. etc.

    Plan: "3 ordered" and "4 complete"
    Ist: "5 Implemented"
    For all other numbers nothing should be calculated.

    So basically to narrow it down, my question is:

    How can I make a cell calculate things based on three different values in another sheet? Important is also, that the date is depending on the Year as well.

    It doesn't matter if it's in Excel Functions or VBA.

    Thanks in advance and sorry for my bad english!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-06-2019
    Location
    Karlsruhe, Germany
    MS-Off Ver
    Office 365
    Posts
    24

    Re: Based on three values in one sheet calculate number

    Can nobody help?

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Based on three values in one sheet calculate number

    I am sure they can
    you need the dates for October 19 to be proper dates in the test sheet if d10 was october 10 (1/10/19)

    then =SUMIFS(ADB!$T:$T,ADB!$R:$R,">="&test!D$10,ADB!$R:$R,"<"&EDATE(test!D$10,1),ADB!$U:$U,"3 Ordered")+SUMIFS(ADB!$T:$T,ADB!$R:$R,">="&test!D$10,ADB!$R:$R,"<"&EDATE(test!D$10,1),ADB!$U:$U,"4 confirmed")

    or
    =SUM(SUMIFS(ADB!T:T,ADB!$R:$R,">="&test!D$10,ADB!$R:$R,"<"&EDATE(test!D$10,1),ADB!$U:$U,{"3 Ordered","4 Confirmed"}))

    may be what you are looking for (you may have to switch , for ; depending on your region
    you also say complete when your data says confirmed

    Any closer?

  4. #4
    Registered User
    Join Date
    08-06-2019
    Location
    Karlsruhe, Germany
    MS-Off Ver
    Office 365
    Posts
    24

    Re: Based on three values in one sheet calculate number

    Hey davsth,

    thanks for your reply. I receive #NAME? in the cells when I put that in. I am not entirely sure in which cell I am supposed to put that formula also.

    Thanks for the advice with the ";". I needed to change it :-D
    So right now I am a bit confused about where to put the formula and how to change the dates. Because I want table to react dynamically t5o a change in the year (e.g. 15/16)

    thank you already!

  5. #5
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Based on three values in one sheet calculate number

    What is unclear is how you update the dates

    D10 needs to update from someother selection, it might be =d6 or something else, you have not explained!
    e11 could be edate(d10,1) anf this can be copied in all the cells to the right (dates can be formated as MMM if you do not want the year to appear, I assume the labels are the short month in german!)

    the formula I gave goes in D12 and can be copied to the right

    =SUM(SUMIFS(ADB!$T:$T,ADB!$R:$R,">="&test!D$10,ADB!$R:$R,"<"&EDATE(test!D$10,1),ADB!$U:$U,{"3 Ordered","4 Confirmed"}))

    Any closer?

  6. #6
    Registered User
    Join Date
    08-06-2019
    Location
    Karlsruhe, Germany
    MS-Off Ver
    Office 365
    Posts
    24

    Re: Based on three values in one sheet calculate number

    Okay, sorry for not specifying enough!

    So the year is in D4, which is a dropdown list that takes data from the parameter sheet. You are right, the labels are the shorts for the months in german.
    Somehow I think the comparison between the dates and D10 is what is not working right now for me. Does it work if you test it in the file?
    It might be the formatting, I am trying every single format right now
    im sorry for being so dumb with excel

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Based on three values in one sheet calculate number

    The date cells may need work on, as it is not clear which referrence to link for the year
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-06-2019
    Location
    Karlsruhe, Germany
    MS-Off Ver
    Office 365
    Posts
    24

    Re: Based on three values in one sheet calculate number

    Hey davsth,

    thank you for the response! I am currently not in office to check it so I will need to reply you in two days.
    I hope this can wait for that time

    THank you sooo much already!!

+ 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: 1
    Last Post: 02-13-2019, 05:09 AM
  2. Replies: 4
    Last Post: 10-16-2015, 12:59 PM
  3. Replies: 12
    Last Post: 08-05-2015, 05:15 PM
  4. Calculate number of days between 2 dates & then assign a number based on the answer
    By MrHappyGoLucky12 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-27-2014, 09:20 PM
  5. [SOLVED] Calculate values in col B based on value in col B but only calculate final 5 instances
    By arnoldd99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2013, 11:53 AM
  6. Replies: 1
    Last Post: 07-18-2013, 10:11 AM
  7. Replies: 2
    Last Post: 10-08-2012, 04:13 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