So I currently have a spreadsheet for monthly reporting that has a VLOOKUP for months and values. The data is collected and reported monthly and then input into a master workbook that calculates all of the metrics to the master charts. What I have been building on is an If(AND) statement and then adding a new sheet every month. The formula checks columns 7 and 8 for values on each page and only uses the value in column 8 if the value in column 7 is >0.
The formula currently looks like this:
=IF(AND(VLOOKUP($A2,December_2020!$A$5:$AE$62,7,FALSE)>0,VLOOKUP($A2,January_2021!$A$5:$AE$62,7,FALSE)>0,VLOOKUP($A2,February_2021!$A$5:$AE$62,7,FALSE)>0,VLOOKUP($A2,March_2021!$A$5:$AE$62,7,FALSE)>0,VLOOKUP($A2,April_2021!$A$5:$AE$62,7,FALSE)>0,VLOOKUP($A2,May_2021!$A$5:$AE$62,7,FALSE)>0,VLOOKUP($A2,June_2021!$A$5:$AE$62,7,FALSE)>0),SUM(VLOOKUP($A2,December_2020!$A$5:$AE$62,7,FALSE),VLOOKUP($A2,January_2021!$A$5:$AE$62,7,FALSE),VLOOKUP($A2,February_2021!$A$5:$AE$62,7,FALSE),VLOOKUP($A2,March_2021!$A$5:$AE$62,7,FALSE),VLOOKUP($A2,April_2021!$A$5:$AE$62,7,FALSE),VLOOKUP($A2,May_2021!$A$5:$AE$62,7,FALSE),VLOOKUP($A2,June_2021!$A$5:$AE$62,7,FALSE)),VLOOKUP($A2,INDIRECT(INDEX(wshNamesLast,COUNTA(wshNamesLast)+RAND()*0)&"!$A$8:$AF$62"),8,FALSE))
I need to make sure that it calculates the sheet automatically. Updating the formula every month is tedious and prone to human error but adding in months for blank sheets throws off my calculations since I get reporting from two different sources for each account.
Q: How can I streamline this formula to allow the sheets to still calculate correctly with any number of sheets in the workbook?
Related
I am using the formula below in my 'ALL SALES' sheet to consolidate sales from multiple sheets for a corresponding month in each sheet ... So E618 in each tab would be the sales for say Mar-22 and so on for 60 months. This has been working fine as follows
SUM(Intl_Schedules_Start:Intl_Schedules_End!E618)
The sheets all had Mar-22 through Feb-26 in E617 onward so summing it was simple with the above formula..
Now my sheets are more dynamic in that E617 could have Mar-23 onwards for the other 59 months in row 617 in which case when I add the cells E617 from each sheet together I am getting the wrong result as it is adding E618 from one tab which has Mar-22 in E617 and the other tab's E617 is now Mar-23 which of course is incorrect. I have been searching a way to conduct the same calculation but incorporating one criteria of matching the month value in 'ALL SALES' month column (say Mar-22) with the month in each sheets' E617 which could be different... So to summaries.. IN ALL SALES under mar-22 I need to add all the corresponding values in each tab where the month in cell C217 match
There are examples I have found on the web which require a separate list of all the tabs that are being summed but as my sheets could be moved and new ones with different names added it makes for a very time consuming task....
I anyone able to assist me in this?
I hope the image below gives a better idea
TIA
Based on the formula you give within the comments:
=SUM(FILTERXML("<a><b>"&TEXTJOIN("</b><b>",0,Intl_Schedules_Start:Intl_Schedules_End!AR1,Intl_Schedules_Start:Intl_Schedules_End!E618)&"</b></a>","//b[preceding::*["&SHEETS(Intl_Schedules_Start:Intl_Schedules_End!E618)&"]="""&C2&"""]"))
This could be abbreviated using LET if desired.
I built a tracker for my platoon to manage numerous training dates based on completion. Each sheet tracks different things and I'm trying to make a coversheet that pulls data from each sheet to give an overall snap shot. I'm trying to create and IF formula for if any of the dates in a certain row are over due, it reports as over do. I can do it with 1 or 2 but not with 14 different dates. Is this possible?
I have a task that involves plotting data over time from a set of spreadsheets, where the number of spreadsheets increases by 1 each month. I'm wondering what the easiest, most user friendly way to do this for novice excel users.
Say I have workbooks in a directory:
xjan19.xlsx
xfeb19.xlsx
xmar19.xlsx
xapr19.xlsx
Each of these workbooks thankfully has the same sheet structure. suppose I need to extract up to 20 business days of data in a column from sheet "profit" starting from say cell B10 (the exact number of rows in this cell selection isn't fixed for each month).
I need to pull the the data from each of the above four workbooks into a "master.xlsx" workbook (say sheet "profitovertime") and merge them into a long time series of daily profit numbers, and then perform analysis on them (charts, etc).
I then need to make it easy for the user to insert the data for xmay19.xlsx, etc and so on (from sheet "profit" in xmay19.xlsx, starting in B10).
What is the easiest way to do this? I've just researched creating Excel connections from Data > Connections in "master.xlsx" and passing in tables in "master.xlsx", but this means I have a new sheet in "master.xlsx" for each month and then update the cells manually in the "profitovertime" sheet in "master.xlsx".
Is there a more seamless way to do this that offers more automation?
I imagine doing something like passing in a string giving the absolute file path of each month in a column of cells in some sheet in "master.xlsx", and then everything automatically updates in the master.xlsx's "profitovertime" sheet after only inputting the path to this new file.
I have a Table in Excel that contains yearly usage data for some products. For example, I have Product A with usage stats from 2003 to 2014. The table is referenced via several Named ranges to be used in formulas. Usage_Product is the column name of the products, Usage_Year is the Year, and Usage_Grand_Total is the total for all months in that year.
I have a basic data chart built using formulas that key off of a Named cell reference called YearSelected. The cell contains a list of years, allowing the user to select the Year they want to see usage for. The following formula works fine when the year is selected:
=SUMIFS(Usage_Grand_Total,Usage_Product,A3,Usage_Year,YearSelected)
A3 is a reference to a cell that contains the specific product name that matches the Table data.
However, I would like to get a sum that includes all prior years instead of just the one selected. I tried the following formula (and variations of it) without success:
=SUMIFS(Usage_Grand_Total,Usage_Product,A3,Usage_Year,"<"&YearSelected)
This returns 0 for some reason. Even if I do "<"&2014 or "<2014", I get the same 0. I do a lot of similar types of formulas, but this one has me stumped. The basic goal is to have a running summary of usage for the start of each selected year. Any ideas on using the right formula option?
I'm trying to summerise daily inventory in a new wkb, by referencing another wkb(source) which contains sheets/tabs named in date order(such as 01.04.14, 02.04.14 etc). On each of the source sheets/tabs, the total daily figure is in cell D23. On the destination sheet, I've labelled the columns 1 , 2, 3.....to represent each day and the months on the rows.
I tried using the indirect function
=INDIRECT("'X:\WorkbookDirectory\["&TEXT($A2,"MMM-YY")&".xlsx]"&TEXT(B$1,"DD.MM.YY")&"'!$F$23")
however, it couldn't copy across the sheets/tabs. Any ideas as how I could fix this with a VBA code?