+ Reply to Thread
Results 1 to 4 of 4

Can I Get The Two Figures To Constantly Stay?

Hybrid View

  1. #1
    Registered User
    Join Date
    07-30-2015
    Location
    England
    MS-Off Ver
    365
    Posts
    32

    Can I Get The Two Figures To Constantly Stay?

    Hi guys,

    I really need your help! I am making a new system for my Window Cleaning business and I have attached a list of customers that I am cleaning windows for. I am doing this every other week, which is why the calendar at the top of the page looks how it does.

    However, on the right hand side, I have a list of the weeks (26 in total) with a "Houses Cleaned" column and a "Total" column. I would like the two figures at the bottom of the page to go into the correct cells.

    If that didn't make sense, say if I was cleaning windows on the 04/01/2016 and I cleaned 40 houses and made £152.00. I would like these two figures to go into that row on the right hand side. I have actually figured out how to do that but when I change the date, the figures change and it just goes on to the date which is selected.

    Therefore, if possible, I would like the figures for 04/01/2016 to stay in their specific cells even if another date is selected. Therefore, come the end of the year, I would like the table on the right to be filled with figures automatically. If this is possible, I would really appreciate it if someone could help me.

    I will attach the file below. Just to make it clear, I would like the "40" and "£152.00" to stay in each of the boxes when the user changes the dates.

    Many thanks, FFFLeague15

    Trial.xlsm

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Can I Get The Two Figures To Constantly Stay?

    The problem here is that the table on the right gets updated based on what the date is, since the table on the left is not date specific... and applies only to the date at the top. One thing I can suggest is to make a button next to the date at the top, which you use to "Freeze" the data for that week. In other words, the button would take the row for the given week and put in static values on that row of your right hand table.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Can I Get The Two Figures To Constantly Stay?

    Arkadi is right. I am going to propose a simpler design. It uses Excel tables and it uses data validation. You can find out more about tables here: http://www.utteraccess.com/wiki/inde...ables_in_Excel and Data Validation here: http://www.utteraccess.com/wiki/inde...ata_Validation.

    There are a couple of nice things about Excel tables: one of them is that the table grows to accommodate however much data you have. So you don't have to guess how many houses you will do in a time period. You won't have to deal with extra lines. Put the cursor in the last row and column of the table and press <TAB> and it opens a new line in the table for you. Another thing about tables is the natural-language type syntax.

    I did use one trick with the data validation. The source for the drop-down list in Week Beginning is =INDIRECT("Table_Dates[Start Date]") normally you would use a range of values or a named range, but this syntax is a shortcut if you already have the data in a table.

    So here is the setup: Column A has the week beginning, you can select the value you want from the dropdown list. Alternatively, you can type in the date manually. You can use the latter method to open up a new line in the table if you start typing on the row immediately after the existing data. In either event, you should not be able to add in a wrong date.

    The rest of the columns have the same formulas as your worksheet except that the formulas are in table format. So instead of =0.5*K2 you have =0.5*[Total Windows Cleaned].

    The Table in Columns M through O is used both as a source for data validation and for the computation of the results you want. The SUMIF Formula is used =SUMIFS(Table_Windows[[Total]],Table_Windows[Week Beginning],[@[Start Date]]).

    The box in Columns P-R is called a slicer. It's just a fancy name for filter. You can also use the filter in Column A to limit the data to whatever month or week you are working in. If you do, the slicer will show you what weeks are selected. They are two different ways of doing the same thing. You can read up on slicers using a search engine. They're a lot simpler than they look.

    That's all there is to it. You will have the entire year's data in the green table and you only need to look at as much of it as you need. You don't need extra lines "just in case" and if you have a really busy month, the tables won't limit the number of houses you can do.
    Windows.xlsb

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Can I Get The Two Figures To Constantly Stay?

    Hi,

    A simple Sheet Change event macro could do this.

    Name the K8 cell "selection". In M8 enter the formula
    Formula: copy to clipboard
    =MATCH(K8,P:P,FALSE)


    Then replace the current sheet change event macro with this.

    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim lRow As Long
        If Target.Column = 5 Then
            If UCase(Target.Value) = "FULL-TIME" Then
                Target.Offset(0, 1).Value = 2080
                Target.Offset(0, 2).Value = 260
                Target.Offset(0, 3).Value = 52
            End If
        End If
    
        If Not Intersect(Target, Range("Selection")) Is Nothing Then
            lRow = Sheet1.Range("selection").Cells(1, 3)
            Application.EnableEvents = False
            Sheet1.Range("Q" & lRow & ":R" & lRow) = Sheet1.Range("Q" & lRow & ":R" & lRow).Value
            Application.EnableEvents = True
        End If
    
    
    End Sub
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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: 0
    Last Post: 11-21-2014, 09:25 AM
  2. Conversion of an array of figures inputted into cells as word figures to Excel figures
    By Allan Simpson730 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-08-2013, 07:25 AM
  3. [SOLVED] Changing minus figures to positive figures
    By sammy011 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-25-2012, 07:10 PM
  4. [SOLVED] Applying figures and sums of figures to relevent cells
    By JakeMann in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-15-2012, 10:08 AM
  5. Replies: 0
    Last Post: 09-12-2010, 12:56 PM
  6. Average on the 6 latest figures of a list where figures keep being added
    By patounet527 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-27-2009, 06:02 AM
  7. [SOLVED] Changing positive figures to minus figures
    By Louise in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-14-2005, 06:05 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