[Solved] Formula to reference data in another spreadsheet
[Solved] Formula to reference data in another spreadsheet
This may have been addressed before, but I could not find anything that made sense to me (I have been a long time excel user). I am new to open office and I have an interest in trying to work with it,. Mainly because my employer is using it.
So, I work at a cab company and have created a spreadsheet to help track my daily drops and such.
What I want to do now is create a separate spreadsheet to summarize and calculate what I have earned each week. Yes, I can just manually copy and edit each reference, but I'd like to be able to create a formula that can access the spreadsheet. All I'd have to do is just have the name of the sheet in a cell, have the formula reference it and pull up the data.
So, I work at a cab company and have created a spreadsheet to help track my daily drops and such.
What I want to do now is create a separate spreadsheet to summarize and calculate what I have earned each week. Yes, I can just manually copy and edit each reference, but I'd like to be able to create a formula that can access the spreadsheet. All I'd have to do is just have the name of the sheet in a cell, have the formula reference it and pull up the data.
Last edited by Hagar Delest on Sat Apr 15, 2017 3:07 pm, edited 1 time in total.
Reason: tagged solved.
Reason: tagged solved.
OpenOffice 4.1.3 / Windows 10
Re: Formula to reference data in another spreadsheet
Assuming you are working on Sheet2 and want to reference the content of cell B7 of Sheet1, this is done by
To get the same reference taking the sheetname 'Sheet1' from cell A1 where it was entered as text, you can use
If you want to reference the cell in the 12th column of the 5th row of the sheet whose name was placed into cell A1 of the current sheet, you can use
and so on...
To advise more precisely I would need a more precise explanation about what you try to achieve.
As you described yourself as a former Excel user you may explain your goals by giving the formulas you would expect to work in Excel delivering the results you want.
Code: Select all
Sheet1.A7Code: Select all
INDIRECT(A1&"A7")Code: Select all
OFFSET(INDIRECT(A1&"A1");5-1;12-1)and so on...
To advise more precisely I would need a more precise explanation about what you try to achieve.
As you described yourself as a former Excel user you may explain your goals by giving the formulas you would expect to work in Excel delivering the results you want.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
Re: Formula to reference data in another spreadsheet
It may be that a pivot table aka data pilot will group/sum the information you need.
Slackware 15 (current) 64 bit
Apache OpenOffice.1.16
LibreOffice 26.8.0.3; SlackBuild for 26.8.0 by Eric Hameleers
-----------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
Apache OpenOffice.1.16
LibreOffice 26.8.0.3; SlackBuild for 26.8.0 by Eric Hameleers
-----------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
Re: Formula to reference data in another spreadsheet
What I am trying to do is pull data from a different spreadsheet.
On my Summary sheet, I pull 8 pieces of data. Sales, Credit Card, Tips, etc...
But each day is on a separate spreadsheet. They are named in the following format 3 03 17 tom.ods. They are not tabs in the same spreadsheet, but completely different spreadsheets. I am going to go back and look at what the responses are, but they do not seem correct. What I want to do is put a date in, have the spreadsheet pull the date out and convert it to the format I need, then pull the data.
indirect is what I think I need, but I can't seem to get it to access the spreadsheet.
I try to avoid using pivot tables. Will use them, but I have found that most of the time, I can't do exactly what I want in them.
Can I upload the spreadsheet?
On my Summary sheet, I pull 8 pieces of data. Sales, Credit Card, Tips, etc...
But each day is on a separate spreadsheet. They are named in the following format 3 03 17 tom.ods. They are not tabs in the same spreadsheet, but completely different spreadsheets. I am going to go back and look at what the responses are, but they do not seem correct. What I want to do is put a date in, have the spreadsheet pull the date out and convert it to the format I need, then pull the data.
indirect is what I think I need, but I can't seem to get it to access the spreadsheet.
I try to avoid using pivot tables. Will use them, but I have found that most of the time, I can't do exactly what I want in them.
Can I upload the spreadsheet?
Last edited by tperry on Fri Apr 14, 2017 5:28 pm, edited 1 time in total.
OpenOffice 4.1.3 / Windows 10
Re: Formula to reference data in another spreadsheet
It may be that OO will not like the spaces in the names. If that turns out to be the case, I suggest replacing these spaces with underscores.
Apache OpenOffice 4.1.16 on Xubuntu 26.04.1 LTS
Re: Formula to reference data in another spreadsheet
Removed spaces and still not having any luck
I can manually do the reference:
'file:///C:/Users/Tom/Documents/MarshallTaxiFiles/30317tom.ods'#$Drop_Calculator.$A$3
But, when I try using index, indirect I keep getting ERR:502. Format I am trying is like this:
Cell A1 contains "file:///C:/Users/Tom/Documents/MarshallTaxiFiles/" (Without quotes)
Cell b1 contains "30317tom.ods" (Without quotes) This would change for different files
Cell c1 contains "#$Drop_Calculator" (Without quotes) This would change for different Cell References
Tried using Indirect(a1&b1&c1;a3) and I get ERR:502, but I can't find WHAT is the invalid reference
Same thing when I try index.
I can manually do the reference:
'file:///C:/Users/Tom/Documents/MarshallTaxiFiles/30317tom.ods'#$Drop_Calculator.$A$3
But, when I try using index, indirect I keep getting ERR:502. Format I am trying is like this:
Cell A1 contains "file:///C:/Users/Tom/Documents/MarshallTaxiFiles/" (Without quotes)
Cell b1 contains "30317tom.ods" (Without quotes) This would change for different files
Cell c1 contains "#$Drop_Calculator" (Without quotes) This would change for different Cell References
Tried using Indirect(a1&b1&c1;a3) and I get ERR:502, but I can't find WHAT is the invalid reference
Same thing when I try index.
OpenOffice 4.1.3 / Windows 10
- MrProgrammer
- Moderator
- Posts: 5470
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Formula to reference data in another spreadsheet
Hi, and welcome to the forum.
Read the documentation on INDIRECT, Help → Index → INDIRECT. The first argument is required; the second is optional and only needed if you want to use R1C1 references, which you don't. Given the contents of those cells use =INDIRECT("'"&A1&B1&"'"&C1&".A3") to referencetperry wrote:I can manually do the reference:
'file:///C:/Users/Tom/Documents/MarshallTaxiFiles/30317tom.ods'#$Drop_Calculator.$A$3
But, when I try using index, indirect I keep getting ERR:502. Format I am trying is like this:
Cell A1 contains "file:///C:/Users/Tom/Documents/MarshallTaxiFiles/" (Without quotes)
Cell b1 contains "30317tom.ods" (Without quotes) This would change for different files
Cell c1 contains "#$Drop_Calculator" (Without quotes) This would change for different Cell References
Tried using Indirect(a1&b1&c1;a3) and I get ERR:502, but I can't find WHAT is the invalid reference
'file:///C:/Users/Tom/Documents/MarshallTaxiFiles/30317tom.ods'#$Drop_Calculator.$A$3If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
Re: Formula to reference data in another spreadsheet
I will swear on a stack of bibles, that is the way I was trying and for some reason, it kept failing. Now it works.
Thank you!
Thank you!
OpenOffice 4.1.3 / Windows 10
Re: Formula to reference data in another spreadsheet
There are differences in punctuation between what you said you were trying to use and MrProgrammers solution
The various quotation marks (both single and double) as well as the proper character separating the file name and the cell address are, specifically, the differences.
Code: Select all
=Indirect(a1&b1&c1;a3)Code: Select all
=INDIRECT("'"&A1&B1&"'"&C1&".A3")OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Re: Formula to reference data in another spreadsheet
Figured it might have been punctuation. Always gets me. 
OpenOffice 4.1.3 / Windows 10