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?
Related
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?
I'm trying to write a Macro/VBA that will pull certain data from different sheets, ( Basically 12 Sheets a separate sheet for each Month ) into a different sheet. I'm not sure where to start.
The Macro will need to be able to look through the rows in the 12 sheets and pull the necessary cells that meet the following criteria: I have a particular column named as category, if there is a cell with the value debtors in that column I would like to pull that data to the final sheet named debtors. I am attaching a sample Excel for your reference.https://drive.google.com/file/d/1rJxNdHxXtKGHjMKIozrbV3UN4hpDpIec/view?usp=sharing
Is there a way to accomplish this?
I am looking to populate my sheet with the sum of sales values from an external workbook.
My sheet has monthly dated column headings
The external workbook has sheets named as months "Aug", "Sep" etc.
I am looking for formula that adapts the reference to the external workbook's sheets based on the month value of the column header in my sheet.
However, both routes I have attempted below to calculate this return #REF errors if the external workbook is not open. Is it possible to dynamically reference the external workbook whilst it is closed?
I have attempted to achieved this in two ways:
Where U1 is 01/08/2019
Attempt 1:
=(SUMPRODUCT((INDIRECT("'T:\Analytics\KPIs\KPI Data\2019\NewPipeline.xlsx'!"&TEXT(U1,"mmm")&"[Price Per Unit]"))*(INDIRECT("'T:\Analytics\KPIs\KPI Data\2019\NewPipeline.xlsx'!"&TEXT(U1,"mmm")&"[Est. Close Date (Opportunity) (Opportunity)]")>=DATE(YEAR(U1),MONTH(U1),DAY(U1)))*1))
Attempt 2:
=SUM(IF((INDIRECT("'T:\Analytics\KPIs\KPI Data\2019\NewPipeline.xlsx'!"&TEXT(U1,"mmm")&"[Est. Close Date (Opportunity) (Opportunity)]"))>=DATE(YEAR(U1),MONTH(U1),DAY(U1)),INDIRECT("'T:\Analytics\KPIs\KPI Data\2019\NewPipeline.xlsx'!"&TEXT(U1,"mmm")&"[Price Per Unit]")*1,0))
I will have a defined number of identical workbooks within excel for each member of staff, at present this is 3. I want to have a master workbook where I can consolidate the data from all 3 workbooks. If there was a defined number of inputs I could obviously just copy and paste the data over or use a macro to make it seem more 'live'. However, it will be unknown how many inputs each member of staff will have and the only way I could imagine doing it is by the following equation (however I would use the workbook reference):
=IF(Sheet1!A1<>"",Sheet1!A1,IF(Sheet2!A1<>"",Sheet2!A1,IF(Sheet3!A1<>"",Sheet3!A1,0)))
However, when you drag the formula down it will give the obvious problem of putting the value of Sheet2!B13 in the 13th cell if there were only 12 inputs in SheetA, I would need to know the final value of the first sheet to reference the second sheet - but they are dynamic.
Any help would be appreciated.
If you want to find the last row of an area by a formula in Excel;
You need Table:
Select your area.
Click on Formats as Table from Home→Styles, and select one of then
Now you have DESIGN tab that you can see the Table Name like Table1.
Now, you have a table and by this formula you can find number of rows of your table:
=ROWS(Table1)
And by this formula you can find number of columns of your table:
=COLUMNS(Table1)
And when you want to know its value try this (The final value):
=INDIRECT(T(ADDRESS(ROWS(Table1)+1; COLUMNS(Table1)))
NOTE : By using Tables you Don't need to specify your sheet.
I am currently creating a set of templates to be used in a quality assurance excel sheet. The aim is to have the scores from each sheet displayed on the top sheet of the excel 2007 book. Currently I can use a look up to pull the data, but I only pulls it to the same cell, and only for current sheets. Not for any new ones added.
Is it possible to have a formula that will look up a value on any new sheet created from a template and place it in a table that I can graph?
You can do it with VBA, but I think this 3 step XLM (Excel4.0 Macro) approach is cleaner.The approach is to set a range name that contains all sheet names in the workbook, then extract them against a list of numbers.
Define a range name, wsName as =RIGHT(GET.WORKBOOK(1),LEN(GET.WORKBOOK(1))-FIND("]",GET.WORKBOOK(1)))
(credit david Hager http://spreadsheetpage.com/index.php/site/eee/issue_no_3_april_15_1999/)
use a formula such as =IF(A2<=COUNTA(wsNames)+0*RAND(),INDEX(wsNames,A2),"") to extract all the names on your summary sheet against a numbered list. This formula simply checks whether x sheets (say 6) are in the live file, if so its put the sheet x name (the 6th sheet) against the number x (6).
Use INDIRECT with this sheet name to retrieve the values, ie to get A1 from each sheet, =IF(B3<>"",INDIRECT("'" &B2&"'!A1"),"")
Should add sheets be added - or deleted - all the names update in sequence automatically