+ Reply to Thread
Results 1 to 19 of 19

Updating workbook formulas for additional variables

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Updating workbook formulas for additional variables

    Hello,

    I had assistance making the attached workbook years back and I am looking to additional variables.

    On the worksheet "Summary" there are options to lookup an employee's data on the "Data" worksheet.

    This can be narrowed down by entering a start date and end date or using a trackback option for number of days back to look.

    The results are displayed in A4:H1000.

    On the worksheet "Data" in column G there are helper formulas.

    I am trying to add two additional filters to the "Summary" worksheet.

    One for Shift and one for Type.

    My attempt to update these two formulas causes errors:
    =IF(OR(ROWS($B$4:$B4)>$H$1,$C$1="",COUNTBLANK($D$2:$D$2)=2),"",INDEX(Data!B:B,MATCH(ROWS($B$4:$B4),Data!$G:$G,0)))

    =IF(Summary!$F$1="",IF(Summary!$C$1="All",SUMPRODUCT(--(A$2:A2>=Summary!$B$2),--(A$2:A2<=Summary!$D$2)),SUMPRODUCT(--(B$2:B2=Summary!$C$1),--(A$2:A2>=Summary!$B$2),--(A$2:A2<=Summary!$D$2))),IF(Summary!$C$1="ALL",SUMPRODUCT(--(A$2:A2>=TODAY()-Summary!$F$1),--(A$2:A2<=TODAY())),SUMPRODUCT(--(B$2:B2=Summary!$C$1),--(A$2:A2>=TODAY()-Summary!$F$1),--(A$2:A2<=TODAY()))))

    I appreciate any help in adjusting these formulas.

    Thank you,
    Nick
    Attached Files Attached Files
    Last edited by nickpavlov; 11-28-2021 at 06:04 PM.

  2. #2
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    This is basically how it will be, just one formula in A4 instead of 1,000 lines of formulas and no helper column, see file attached.
    Also implemented slicers in the sheet 'Data' where you can have more freedom of filtering by multiple itens, if you accept the named table concept.
    Attached Files Attached Files
    Last edited by DJunqueira; 11-28-2021 at 09:18 PM.

  3. #3
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    PMDJunqueira, that is very interesting. A few questions.

    1. How did you do this? :-)
    2. How can I expand the Summary worksheet to add more rows?
    3. I need to work in more variables F2 & H2 on the Summary worksheet.

    But this is pretty awesome, never worked with whatever you did!

    Thank you,

  4. #4
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    Quote Originally Posted by nickpavlov View Post
    PMDJunqueira, that is very interesting. A few questions.
    1. How did you do this? :-)
    2. How can I expand the Summary worksheet to add more rows?
    3. I need to work in more variables F2 & H2 on the Summary worksheet.
    But this is pretty awesome, never worked with whatever you did!
    Thank you,
    All of this is because the new feature of Excel 365 to work with dynamic arrays.

    1. You don't need to have and carry 1,000 of formulas any more, just one cell has it all!
    2. There is no limit!!
    3. I have already implemented that.

    Look again the file, I am improving it in the first massage since I wasn't sure you where seeing it.

  5. #5
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    Now I implemented a Pivot Table with Timeline just for you to see the potential of Excel that you are not using.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    Thank you DJ! This will keep me busy playing with for a week or two :-)

  7. #7
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    Thank you, happy to help.

  8. #8
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    Hi DJ,

    I am playing around with the Table Filter Formula you created. (attached)

    If I remove the dates in B2 & D2, I get a #CALC! error, since there is no date range.

    Do you know a way that if there are no dates in those cells that it will display data from the last 180 days by default?

    I started watching some YouTube videos on Pivot Tables to understand how you created those also, that will definitely keep me busy for a couple weeks

    Thank you,

  9. #9
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    Hi nickpavlov,

    I did some changes, now you can use the TRACKBACK again and for the date question I offer the solution of choosing instead the starting date of the Data table and the Today's date as limits that you can choose in the drop down menu, those dates do not limit the entry of other dates, it is just for not using blank as a criteria.

    I also changed the order of the first two columns to their original places.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    Thank you DJ, this is pretty exciting stuff for me, all the formulas before would slow down the processing.

  11. #11
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    Yes, this new version of Excel is very interesting, much easy to work with big data.

  12. #12
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    I tweaked it a bit more, I didn't really need a track back. But I do need by default to display the last 180 days.

    So I have added a start date and end date that goes back 180 days, and for a custom date, the user can type in that.

    What I also like about this technique is that you don't need to worry about dozens of pages printing due to hidden formulas.
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    Yes, the hidden formulas were very unproductive, growing excessively the size of the files.

  14. #14
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    DJ, do you know if it is possible when using the Filter Table Formula, can you not displays a column in a Table?

    Example attached.
    Attached Files Attached Files

  15. #15
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    You can avoid displaying a column in a formula with FILTER().

  16. #16
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    I'm looking online and saw this formula example, where 4,3,5 is the columns displayed. I can't get it to work with the one you created.

    Do you think it is something similar?

    =FILTER(INDEX(tblData,SEQUENCE(ROWS(tblData)),{4,3,5}),tblData[Customer Name]=I3)

  17. #17
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Updating workbook formulas for additional variables

    Quote Originally Posted by nickpavlov View Post
    I'm looking online and saw this formula example, where 4,3,5 is the columns displayed. I can't get it to work with the one you created.
    Do you think it is something similar?
    =FILTER(INDEX(tblData,SEQUENCE(ROWS(tblData)),{4,3,5}),tblData[Customer Name]=I3)
    The formula was there for you to play.

    =IF(C1="";"";INDEX(FILTER(TData;IF(C1="All";1;TData[EMPLOYEE NAME]=C1)*(TData[AUDIT DATE]>=B2)*(TData[AUDIT DATE]<=D2)*IF(F2="All";1;TData[SHIFT]=F2)*IF(H2="All";1;TData[TYPE]=H2));SEQUENCE(IF(F1;F1;H1);1;IF(F1;H1-F1)+1;1);{2;1;3;4;5;6}))

  18. #18
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    Thanks DJ, missed it. That is much better than using 1,1,1,1,0,1,1 etc.

  19. #19
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    456

    Re: Updating workbook formulas for additional variables

    Update, watched some YouTube on this lol, this worked:

    =IF(B2="","",FILTER(FILTER(TData,IF(B2="All",1,TData[EMPLOYEE NAME]=B2)*(TData[AUDIT DATE]>=C3)*(TData[AUDIT DATE]<=C4)*IF(E3="All",1,TData[SHIFT]=E3)*IF(E4="All",1,TData[TYPE]=E4)*IF(E2="All",1,TData[REASON]=E2)),{1,1,1,1,0,1,1}))

+ 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] How to find lowest to greatest of 3 values/variables? (Not using workbook formulas)
    By schulzy175 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-18-2018, 05:30 PM
  2. Workbook updating every second and formulas
    By coys1717 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-13-2014, 08:58 PM
  3. [SOLVED] Additional variables for LOOKUP formulas
    By melbox in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2014, 09:30 AM
  4. Replies: 0
    Last Post: 12-19-2012, 11:06 AM
  5. [SOLVED] Excel formulas not updating data from an external workbook
    By musik7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-19-2012, 01:10 PM
  6. Excel Formulas Not Updating, Workbook Calc Set to Automatic
    By chicagoland8 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 10:38 AM

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