Excel Combining Cells into a Formula

Discuss the spreadsheet application
Post Reply
SteveJR73
Posts: 1
Joined: Tue Nov 18, 2008 6:03 pm

Excel Combining Cells into a Formula

Post by SteveJR73 »

Welcome beginner. What is your question or comment?
Please try to briefly and clearly tell us: What you want, What you tried, and What happened.
-----------------------------------------------------------------------------------------------------------
In a new spreadsheet I am currently trying to use the values of two cells to create part of a formula

e.g Cell A10 = O
Cell B1 = 5
and the formula I am trying to create is :='[2008 Holiday Planner.xls]Jan-Jun'!O5

What is the best way to combine the values of A10 and B1 to create "O5" in the formula?

Many Thanks
Steve
OOo 2.3.X on Ms Windows XP
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Excel Combining Cells into a Formula

Post by Villeroy »

Code: Select all

=OFFSET('file:///C:/full/path/2008 Holiday Planner.xls'#$Jan-Jun.$A$1 ; $B$1 ; $A$1)
... where A1 has column offset 14 instead of letter "O" and B1 has the row offset 4. 14 columns and 4 rows offset from A1 is O5.

If it has to be "O" and 15 for "O15:
A1: O
B1: 15
X1: =COLUMN(INDIRECT($A$1&"1"))-1 => 14
Y1: =$B$1-1 => 4

Code: Select all

=OFFSET('file:///C:/full/path/2008 Holiday Planner.xls'#$Jan-Jun.$A$1 ; $Y$1 ; $X$1)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Dave
Posts: 1011
Joined: Sun Dec 23, 2007 6:53 pm

Re: Excel Combining Cells into a Formula

Post by Dave »

SteveJR73 wrote:and the formula I am trying to create is :='[2008 Holiday Planner.xls]Jan-Jun'!O5
Do you perhaps just mean this?

='[2008 Holiday Planner.xls]Jan-Jun'!&A10&B1?

The "&" concatenates text. [That's the ampersand symbol above the "7" key". It's a weird font here for me.]

David.
jackgopher
Posts: 1
Joined: Sun Dec 07, 2008 7:50 pm

Re: Excel Combining Cells into a Formula

Post by jackgopher »

Dave is correct,

The easiest way is to use the ampersand character to combine cells into a string, or to use the "concatenate()" function, as in:
=concatenate('[2008 Holiday Planner.xls]Jan-Jun!',A10,B1)


______
Excel Formulas
OOo 2.3.X on MS Windows Vista
Post Reply