[Solved] Variable in cell address

Discuss the spreadsheet application

[Solved] Variable in cell address

Postby wolstan dixie » Tue May 05, 2020 4:06 pm

If I have a cell with the formula =A1 can the '1' portion of that address be a numeric variable from another cell? ie I want to control the cell referenced by using a variable in another cell?
Last edited by MrProgrammer on Wed May 06, 2020 12:51 am, edited 2 times in total.
Reason: Tagged ✓ [Solved]
Open Office 4.1.7 on Windows 7
wolstan dixie
 
Posts: 4
Joined: Tue May 05, 2020 1:14 pm

Re: Variable in cell address

Postby FJCC » Tue May 05, 2020 4:17 pm

You can do this a few different ways. Let's say the numeric value is in C1. Any of the following might fit your needs.
Code: Select all   Expand viewCollapse view
=INDIRECT("A" & C1)
=OFFSET(A1;C1-1;0)
=INDEX(A1:A10;C1)
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7872
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Variable in cell address [Solved]

Postby wolstan dixie » Wed May 06, 2020 12:14 am

Thanks - one of those should do the trick
Open Office 4.1.7 on Windows 7
wolstan dixie
 
Posts: 4
Joined: Tue May 05, 2020 1:14 pm


Return to Calc

Who is online

Users browsing this forum: Majestic-12 [Bot] and 18 guests