formula to count blanks in a new row every day - excel

I want to count the blank columns in a row, but only for today's date. I figured using COUNTBLANK was the best option but I cant see how to increment the rows.
I uploaded a snippet of the summary sheet that we're using. Within the workbook there's about 20 sheets that need daily updating, and I wanted to have a cell that lets the user know if they omitted entering data into a particular cell.
The cells on the summary sheet aren't actually blank, they all have VLOOKUP formulas in them.

Related

Auto update adjacent cells?

I have a table in excel which is constantly having new rows added. I then have another sheet (lets call it results) which is referencing this table, and counting the values in each column.
Every time I add a new record/row to my table, the results sheet throws a bunch of errors in every cell that references the column. Because I'm using a fixed range in the formula to count the column, e.g. =SUM(A1:A10), I then need to manually click each cell in results and select 'include adjacent cells' to get the count to reflect the new data. I have loads of cells in this table and I'm adding data daily so this is a very long winded way of doing things.
I'm looking for a way that I can automatically update these cells, either by using a macro, or adjusting the formula so that it will automatically increase the range of the SUM when I add new data.
The best solution I've had so far was to simply define the range to include the row below my last piece of data (i.e. if A10 is my last record, the formula would be =SUM(A1:A11)). This works, and auto increments the formula when a new cell is added. However, if I delete the record from the table for any reason, the formula reverts to only including the range containing data.
In other words, this solution works, but only until I have to delete a record. Is there any better solution that can detect which rows are populated, and auto include them in the formula?
=SUMPRODUCT(INDEX('Sheet1!'A:A,1):INDEX('Sheet1!'A:A,LOOKUP(2,1/('Sheet1!'A:A<>""),ROW('Sheet1!'A:A))))
Using INDEX and ROW reference, deleting cells won't result in broken cell references. LOOKUP is used to calculate the last non-empty cell in column A. This will auto update.
Using SUMPRODUCT instead of SUM makes it an array formula and does not require older Excel versions to enter the formula with ctrl+shift+enter (because of the LOOKUP function)
In Office 365 you could use: =SUM(FILTER('Sheet1!'A:A,'Sheet1!'A:A<>""))

Display Row number of cells in a column that are not blank

I am using Office 365.
I have a sheet with a column of relevant values. In a separate sheet of the same workbook, I want to display EVERY row number of cells in a column that are not blank.
The FIRST formula DID work, but it is NOT working anymore. This is where I need help. Is something off here? I don't think I changed anything, but it seemed to just stop working last week, after working well for a couple months.
=IFERROR(SMALL(INDEX(('Patient Tracker'!$A$4:$A$848="")*10^10+ROW('Patient Tracker'!$A$4:$A$848),0),ROW('Patient Tracker'!A1)),"")
The " *10^10+ROW " is to later be able to copy down this formula and draw from this new column of indexed data by using this formula:
=IF(A2<500,INDEX('Patient Tracker'!$A$4:$D$848,A2-3,1),"")
So, if <500, it returns a blank.
THIS formula successfully returns the value of cells that are not blank from the same sheet. This is good, but I want the ROW number of the cell where this data comes from, AND I don't want the blank cells to be copied over to the new sheet, which this formula does.
=IFERROR(INDEX('Patient Tracker'!$A$4:$A$848, SMALL(IF(ISBLANK('Patient Tracker'!$A$4:$A$848), "", ROW('Patient Tracker'!$A$4:$A$848)-MIN(ROW('Patient Tracker'!$A$4:$A$848))+1), ROW(A1))),"")
Please be pateint and specific with me. I barely understand the formulas I am using.

Is there a way to change the formulas in my Excel sheet that reference another worksheet based on the date?

I've spent hours pouring through posts using VBA, VLOOKUP, INDIRECT, etc. but haven't had much luck for this specific situation and just ended up making myself more confused.
I'm essentially doing a daily financial report. I have two worksheets. The first is "Summary" and simply gathers all the data and numbers from the day's sales and presents them neatly. The second worksheet is "Weekly" and this is where I'll input direct values into cells every day (e.g. Items Sold, Retail Shipping Cost, Total F&B Sales today).The "Weekly" worksheet has each date of the month in columns so, for instance, all the numbers for the 3rd of whatever month are input manually by myself under Column D. All the numbers for the 4th of the month are input into Column E.
The first worksheet is essentially just listing these values again more neatly or occasionally totaled up into larger sales categories which leaves me with a long column of cells in "Summary" containing formulas like "Weekly!F8" "Weekly!F10-Weekly!F3" that I have to change every day to reference the next date's numbers (e.g. Weekly!G8" "Weekly!G10-G3"). I've been using Search and Replace so far to search for "Weekly!*" and replace with "Weekly!next letter of alphabet" but I'm looking for a different solution.
Summary - https://i.imgur.com/6KqiyY8.png
Weekly - https://i.imgur.com/R8eafum.png
Is there a way to automate this so that the cell formulas change to reference the following column in another worksheet depending either on the date or a reference cell that contains an integer denoting the day of the month. I could change that one reference cell value manually and ideally have the whole column of reference formulas update as well.
You can use the OFFSET() worksheet function. For example in your first image, the highlighted cell's formula will become =+OFFSET(Weekly!A10,0,$A$1) where cell $A$1 is the reference cell that contains the day of the month.
A better approach than using OFFSET() in all your formulas is to add a column at the end of your "Weekly" worksheet and call it "Today" for example. Use the OFFSET() worksheet function in all cells of this column. Then you can reference only this column in your "Summary" sheet.
Example: In your "Weekly" worksheet use "AG" column as "Today"'s column. Then the formula of "AG10" will become =OFFSET(A10,0,$A$1) and the formula of the highlighted cell in your first image will simply become =+Weekly!AG10

Using internal excel sheet name (i.e. sheet1, sheet2, sheet3) to sum a cell across multiple sheets

I'm trying to sum the same cell across multiple sheets. The number of sheets increases by one each week and will be a new Sheet1. Each sheet will get a date for it's name. The last sheet will have the sum totals. The three sheets prior to that will contain instructions. i.e. 20 sheets, data on sheets 1-16, instructions on sheets 17-19 and totals on sheet 20.
This Sum across dynamic number of sheets question uses a User-defined Function, =autosum, in each cell and could work. I would rather use VBA to create a macro. I know how to get total sheets and sum across all the sheets, where I'm lost is how to sum across (total sheets -4), i.e. sheets 1-16.
code I'm already using is
Dim sheets as Integer
sheets = Application.sheets.Count
=SUM('FirstSheet:LastSheet'!D6)
How do I get
=SUM('FirstSheet:(LastSheet-4)'!D6?
I want to use the internal excel sheet1, sheet2, etc. vs the date name on each sheet, at least for FirstSheet. I can hardcode LastSheet since it won't change.
You shouldn't need to use VBA, you can use the default sum formula. I recommend creating two blank sheets (e.g. "Start" and "End"), ensure that "Start" is always before the first sheet you want to some and "End" is always immediately after the last sheet you want to sum. Then, a formula like this would do what you're asking:
=SUM(Start:End!A1)
Edit: If the name of the first and/or last sheet that should be summed is static, you could avoid using the "start" or "end" placeholders and replace them with the names of the first/last sheets that should be summed.

How do I reference a sheet name in my SUMPRODUCT Formula in MS Excel?

I am trying to figure out how to reference a worksheet name in my SUMPRODUCT cell and I can't figure it out. I am not sure if its because my logic is flawed and there is a better way or if what I want to do isn't possible without using VB code.
Basically I have a workbook that has various data. However for this instance I am only looking at a single column, in this case, the DATE. So I am basically using a SUMPRODUCT Formula to read the entire column for a date that is older than 120 days, but not counting items in the column that are blank. So just cells with a date in it.
This workbook will have worksheets added every month and the previous month will be stored. To make this workbook Dynamic, the first work sheet has various graphs to display information and so it can be printed nicely while the last page has all the formulas.
Basically I looking to create a drop down box on the first worksheet. That dropdown list will have the previous months (the worksheets are named by months), and ideally they will be referenced into the formula as it changes.
For example:
My current formula works: SUMPRODUCT(('OCT 2015'!$G:$G<TODAY()-120)*('OCT 2015'!$G:$G<>""'))
I would like the formula to like: SUMPRODUCT(('CELL_THAT_HAS_SHEETNAME'!$G:$G<TODAY()-120)*('CELL_THAT_HAS_SHEETNAME'!$G:$G<>""'))
And that cell it will reference is a dropdown list and corresponds to the sheetname.
You would incorporate the INDIRECT Function:
=SUMPRODUCT((INDIRECT(A1&"!$G:$G")<TODAY()-120)*(INDIRECT(A1&"!$G:$G")<>""'))

Resources