Linking to a workbook that doesn't yet exist - for use in template creating

SophieYaldwyn

New Member
Joined
Sep 13, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi all,
I am trying to link separate workbooks-not-worksheets that are yet to be created - these would be workbooks created in the future using templates, and the destination workbook I am working in will be a master template as well. This is for a project for study and I have really hit a roadblock here and perhaps thinking I need to completely re-think the entire first workbook I have created. For full information, the study question reads:

"Create a series of Excel spreadsheets to demonstrate the skills you learned in this module.

You will need to demonstrate your ability to design a group of spreadsheets that:

  • have a link between one spreadsheet and another
  • demonstrates conditional formatting
  • use at least three functions from Excel and one formula you create
  • has at least one macro
  • uses a template you created to produce new workbooks
  • uses charts to help analyse data
You will need to provide printouts from the spreadsheets and a copy of a chart.

Example:
A friend knows you have a good understanding of Excel.

He would like you to help him with his business. He wants to keep a spreadsheet for each month’s sales. He has five sales staff and would like to record the daily sales figure. He wants to see a monthly total for each person and a daily sales total. He would also like an average daily sale, the lowest sales figure, and the highest sales figure for each day. The data should have highlighting to show figures below the daily average and figures above the average. There should be a separate worksheet that shows a commission figure for each salesperson daily. He pays each person a flat 15% of everything they sell as a commission.

He thinks a template for the above spreadsheet would help him create a new spreadsheet every month.

Then he would like a master spreadsheet that shows each person’s monthly sales figure. He would like to have an annual total for each and a grand total. He would like a chart showing each person by month and another chart that shows each person’s annual sales figure as a part of the total sales figure."

Is what I am trying to achieve something that is possible?
I have been trying to have a reference cell in the master workbook that shows the workbook-to-be-referenced file name that can then be referenced in the formulae throughout the workbook. So as the new workbooks are created, that reference cell can be edited to contain the new workbook name, which would then automatically adjust content in all the formulae throughout the workbook to create the correct path.
I keep coming up with a File Name Syntax error though when trying to reference that reference cell (I3) in creating the new formula rather than clicking on a cell in the separate workbook.
Hopefully this makes sense and someone is able to lend some expertise. I have attached all workbooks and worksheets below for reference and a screenshot of the error.
Thankyou!
Sophie

Workbook 1, sheet 1:

ProjectBSBTEC402P1.xlsm
ABCDEFGHI
1Monthly Sales Figures: Business Name
2Month2Above AverageBelow AverageHighest FigureLowest Figure
3Year2022Legend:
4Leap Year?No
5DateDayPerson 1 Person 2Person 3Person 4Person 5Average Daily Sale TotalOverall Daily Sales Total
61Tue$ 123.00$ 123.00$ 123.00
72Wed$ 798.00$ 798.00$ 798.00
83Thu$ 23,545.00$ 7,856.00$ 15,700.50$ 31,401.00
94Fri$ 987.00$ 987.00$ 987.00
105Sat$ 3,453.00$ 5,668.00$ 4,560.50$ 9,121.00
116Sun$ 3,246.00$ 3,246.00$ 3,246.00
127Mon
138Tue
149Wed
1510Thu
1611Fri
1712Sat
1813Sun
1914Mon
2015Tue
2116Wed
2217Thu
2318Fri
2419Sat
2520Sun
2621Mon
2722Tue
2823Wed
2924Thu
3025Fri
3126Sat
3227Sun
3328Mon
34 #VALUE!
35 #VALUE!
36 #VALUE!
37Monthly Total$ 28,906.00$ 16,770.00 $ 45,676.00
38Overall Daily Sale Average$ 4,235.83
MonthlySalesFigures
Cell Formulas
RangeFormula
B4B4=IF(MONTH(DATE(B3,2,29))=2,"Yes","No")
H6:H20,H25:H36H6=IFERROR(AVERAGE(C6:G6),"")
B6:B36B6=DATE($B$3,$B$2,$A6)
A34A34=IF(OR(B2=1,B2=3,B2=4,B2=5,B2=6,B2=7,B2=8,B2=9,B2=10,B2=11,B2=12,B4="Yes"), "29", "")
A35A35=IF(B2=2,"","30")
A36A36=IF(OR(B2=1,B2=3,B2=5,B2=7,B2=8,B2=10,B2=12),"31","")
C37:G37,I37C37=IF(SUM(C6:C36)=0,"",SUM(C6:C36))
I6:I36I6=IF(SUM(C6:G6)=0,"",SUM(C6:G6))
H38H38=IFERROR(AVERAGEIF(H6:H36,"<>-"),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C36:G36Cell Valuetop 1 bottom valuestextNO
C36:G36Cell Valuetop 1 valuestextNO
C36:G36Cell Valuebelow averagetextNO
C36:G36Cell Valueabove averagetextNO
C35:G35Cell Valuetop 1 bottom valuestextNO
C35:G35Cell Valuetop 1 valuestextNO
C35:G35Cell Valuebelow averagetextNO
C35:G35Cell Valueabove averagetextNO
C34:G34Cell Valuetop 1 bottom valuestextNO
C34:G34Cell Valuetop 1 valuestextNO
C34:G34Cell Valuebelow averagetextNO
C34:G34Cell Valueabove averagetextNO
C33:G33Cell Valuetop 1 bottom valuestextNO
C33:G33Cell Valuetop 1 valuestextNO
C33:G33Cell Valuebelow averagetextNO
C33:G33Cell Valueabove averagetextNO
C32:G32Cell Valuetop 1 bottom valuestextNO
C32:G32Cell Valuetop 1 valuestextNO
C32:G32Cell Valuebelow averagetextNO
C32:G32Cell Valueabove averagetextNO
C31:G31Cell Valuetop 1 bottom valuestextNO
C31:G31Cell Valuetop 1 valuestextNO
C31:G31Cell Valuebelow averagetextNO
C31:G31Cell Valueabove averagetextNO
C30:G30Cell Valuetop 1 bottom valuestextNO
C30:G30Cell Valuetop 1 valuestextNO
C30:G30Cell Valuebelow averagetextNO
C30:G30Cell Valueabove averagetextNO
C29:G29Cell Valuetop 1 bottom valuestextNO
C29:G29Cell Valuetop 1 valuestextNO
C29:G29Cell Valuebelow averagetextNO
C29:G29Cell Valueabove averagetextNO
C28:G28Cell Valuetop 1 bottom valuestextNO
C28:G28Cell Valuetop 1 valuestextNO
C28:G28Cell Valuebelow averagetextNO
C28:G28Cell Valueabove averagetextNO
C27:G27Cell Valuetop 1 bottom valuestextNO
C27:G27Cell Valuetop 1 valuestextNO
C27:G27Cell Valuebelow averagetextNO
C27:G27Cell Valueabove averagetextNO
C25:G25Cell Valuetop 1 bottom valuestextNO
C25:G25Cell Valuetop 1 valuestextNO
C25:G25Cell Valuebelow averagetextNO
C25:G25Cell Valueabove averagetextNO
C23:G23Cell Valuetop 1 bottom valuestextNO
C23:G23Cell Valuetop 1 valuestextNO
C23:G23Cell Valuebelow averagetextNO
C23:G23Cell Valueabove averagetextNO
C24:G24Cell Valuetop 1 bottom valuestextNO
C24:G24Cell Valuetop 1 valuestextNO
C24:G24Cell Valuebelow averagetextNO
C24:G24Cell Valueabove averagetextNO
C26:G26Cell Valuetop 1 bottom valuestextNO
C26:G26Cell Valuetop 1 valuestextNO
C26:G26Cell Valuebelow averagetextNO
C26:G26Cell Valueabove averagetextNO
C22:G22Cell Valuetop 1 bottom valuestextNO
C22:G22Cell Valuetop 1 valuestextNO
C22:G22Cell Valuebelow averagetextNO
C22:G22Cell Valueabove averagetextNO
C21:G21Cell Valuetop 1 bottom valuestextNO
C21:G21Cell Valuetop 1 valuestextNO
C21:G21Cell Valuebelow averagetextNO
C21:G21Cell Valueabove averagetextNO
C20:G20Cell Valuetop 1 bottom valuestextNO
C20:G20Cell Valuetop 1 valuestextNO
C20:G20Cell Valuebelow averagetextNO
C20:G20Cell Valueabove averagetextNO
C19:G19Cell Valuetop 1 bottom valuestextNO
C19:G19Cell Valuetop 1 valuestextNO
C19:G19Cell Valuebelow averagetextNO
C19:G19Cell Valueabove averagetextNO
C18:G18Cell Valuetop 1 bottom valuestextNO
C18:G18Cell Valuetop 1 valuestextNO
C18:G18Cell Valuebelow averagetextNO
C18:G18Cell Valueabove averagetextNO
C17:G17Cell Valuetop 1 bottom valuestextNO
C17:G17Cell Valuetop 1 valuestextNO
C17:G17Cell Valuebelow averagetextNO
C17:G17Cell Valueabove averagetextNO
C16:G16Cell Valuetop 1 bottom valuestextNO
C16:G16Cell Valuetop 1 valuestextNO
C16:G16Cell Valuebelow averagetextNO
C16:G16Cell Valueabove averagetextNO
C15:G15Cell Valuetop 1 bottom valuestextNO
C15:G15Cell Valuetop 1 valuestextNO
C15:G15Cell Valuebelow averagetextNO
C15:G15Cell Valueabove averagetextNO
C14:G14Cell Valuetop 1 bottom valuestextNO
C14:G14Cell Valuetop 1 valuestextNO
C14:G14Cell Valuebelow averagetextNO
C14:G14Cell Valueabove averagetextNO
C13:G13Cell Valuetop 1 bottom valuestextNO
C13:G13Cell Valuetop 1 valuestextNO
C13:G13Cell Valuebelow averagetextNO
C13:G13Cell Valueabove averagetextNO
C10:G10Cell Valuetop 1 bottom valuestextNO
C10:G10Cell Valuetop 1 valuestextNO
C10:G10Cell Valuebelow averagetextNO
C10:G10Cell Valueabove averagetextNO
C8:G8Cell Valuetop 1 bottom valuestextNO
C8:G8Cell Valuetop 1 valuestextNO
C8:G8Cell Valuebelow averagetextNO
C8:G8Cell Valueabove averagetextNO
C9:G9Cell Valuetop 1 bottom valuestextNO
C9:G9Cell Valuetop 1 valuestextNO
C9:G9Cell Valuebelow averagetextNO
C9:G9Cell Valueabove averagetextNO
C12:G12Cell Valuetop 1 bottom valuestextNO
C12:G12Cell Valuetop 1 valuestextNO
C12:G12Cell Valuebelow averagetextNO
C12:G12Cell Valueabove averagetextNO
C11:G11Cell Valuetop 1 bottom valuestextNO
C11:G11Cell Valuetop 1 valuestextNO
C11:G11Cell Valuebelow averagetextNO
C11:G11Cell Valueabove averagetextNO
C7:G7Cell Valuetop 1 bottom valuestextNO
C7:G7Cell Valuetop 1 valuestextNO
C6:G6Cell Valuetop 1 bottom valuestextNO
C6:G6Cell Valuetop 1 valuestextNO
C7:G7Cell Valuebelow averagetextNO
C7:G7Cell Valueabove averagetextNO
C6:G6Cell Valueabove averagetextNO
C6:G6Cell Valuebelow averagetextNO
A34Cellcontains an errortextNO
B34:B36Cellcontains an errortextNO
Cells with Data Validation
CellAllowCriteria
B2List1,2,3,4,5,6,7,8,9,10,11,12
B3List2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072



Workbook 1 Sheet 2:

Cell Formulas
RangeFormula
B2:B3B2=MonthlySalesFigures!B2
B4B4=IF(MONTH(DATE(B3,2,29))=2,"Yes","No")
C6:G36C6=IF(MonthlySalesFigures!C6*$G$3=0,"",MonthlySalesFigures!C6*$G$3)
C37:G37C37=IF(SUM(C6:C36)=0,"",SUM(C6:C36))
B6:B36B6=DATE($B$3,$B$2,$A6)
A34A34=IF(OR(B2=1,B2=3,B2=4,B2=5,B2=6,B2=7,B2=8,B2=9,B2=10,B2=11,B2=12,B4="Yes"), "29", "")
A35A35=IF(B2=2,"","30")
A36A36=IF(OR(B2=1,B2=3,B2=5,B2=7,B2=8,B2=10,B2=12),"31","")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A34Cellcontains an errortextNO
B34:B36Cellcontains an errortextNO
Cells with Data Validation
CellAllowCriteria
B2List1,2,3,4,5,6,7,8,9,10,11,12
B3List2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072



Workbook 2, Sheet 1 - Where I am trying to create the link using cell I3 as a reference within a cell link such as cell B5 but not manually input.

Project BSBTEC402 P21.xlsx
ABCDEFGHI
1Individual Sales Figure Totals
2Year
3File name of source workbookProjectBSBTEC402P1.xlsm
4MonthPerson 1Person 2Person 3Person 4Person 5
5January$ 28,906.00
6February
7March
8April
9May
10June
11July
12August
13September
14October
15November
16December
17Annual Total
18Annual Grand Total
Sheet1
Cell Formulas
RangeFormula
B5B5=[ProjectBSBTEC402P1.xlsm]MonthlySalesFigures!$C$37
 

Attachments

  • Screenshot (5).png
    Screenshot (5).png
    59.9 KB · Views: 19
You typed the file name twice,
Compare it with the example range I posted earlier.
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
You typed the file name twice,
Compare it with the example range I posted earlier.
Hi Worf,
I had tried without the file name in the first cell as well and kept getting the error, but with fresh eyes and some more playing it is working thank you!
I think the error was happening because on my project the files are saved on a server not the C drive, and inputting the server pathway kept throwing errors. I also had to go into my trust centre and make it view your files as trusted for the error to stop throwing.
But now, with the files saved on the local disk and the file location listed as trusted in my trust centre, this is working.
Thank you so so so much, you have been incredibly patient with me and I appreciate all of your help immensely!

Kindest wishes,
Sophie
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,089
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top