Formula to find a cell's contents based on another cell's address

mlarson

Well-known Member
Joined
Aug 25, 2011
Messages
509
Office Version
  1. 2010
Platform
  1. Windows
This is probably fairly simple but I’m not sure of the formula to use. Any help would be appreciated.

I have $D$4 showing in cell C1, which is good. I would like a formula for cell C2 and another for C3 with the following desired outputs…

I want the output in C2 to be 1 column to the right from the C1 address (which is $D$4). That would be cell E4, so I’d like the contents of E4 (“Lettuce”) to appear in C2.

I want the output in C3 to be 1 column to the right and 1 row down from the C1 address (which is $D$4). That would be cell E5, so I’d like the contents of E5 (“Tomato”) to appear in C3.

C1: $D$4
C2: (blank right now, needs formula)
C3: (blank right now, needs formula)
E4: Lettuce
E5: Tomato

Thank you!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
The cells references in your request do not make sense. Could you post a mini workbook of what your expectations are, and which cells are calculated and which are data input. Here is what I think you are asking:
Mr Excel Questions 4.xlsm
ABCDE
10
2Lettuce
3Tomato
4Lettuce
5Tomato
6
Sheet22
Cell Formulas
RangeFormula
C1C1=$D$4
C2:C3C2=E4
 
Upvote 0
If I'm getting you right, this is what you want

c2: =OFFSET(INDIRECT(C1),0,1)
c3: =OFFSET(INDIRECT(C1),1,1)
 
Upvote 0
Solution
My computer wasn't allowing me to download the mini-screen earlier, so I'm working on that issue.

In the meantime, here's the spreadsheet
CurrentDesired Output
ABCDEFGABCDEFG
1​
$D$4
1​
$D$4
2​
(need formula)
2​
Lettuce
3​
(need formula)
3​
Tomato
4​
Lettuce
4​
Lettuce
5​
Tomato
5​
Tomato
6​
6​
7​
7​
 
Upvote 0
Note: the formula in C1 is not $D$4. That's what appears/shows in cell C1. The formula in C1 is a Cell Index Match that results in $D$4 showing. Apologies for the confusion.
 
Upvote 0
@mlarson
Did you try the formulas suggested by @ACommandLineKindaGuy ?
From what I understand, they do exactly what you asked. Here they are again in action.

23 02 12.xlsm
CDE
1$D$4
2Lettuce
3Tomato
4Lettuce
5Tomato
Formulas
Cell Formulas
RangeFormula
C2C2=OFFSET(INDIRECT(C1),0,1)
C3C3=OFFSET(INDIRECT(C1),1,1)


However, both INDIRECT & OFFSET are volatile functions so best avoided if possible. Posting your current C1 formula as requested above may allow a non-volatile option instead.


My computer wasn't allowing me to download the mini-screen earlier
Can you describe exactly what goes wrong and at what point in the process it goes wrong?
 
Upvote 0
That works, thank you! I might be interested in the less volatile option if there is one.

The formula in question is =CELL("address",INDEX($A$10:$A$173,MATCH("*"&D6&"*",$A$10:$A$173,0))) but that is from my actual worksheet (which is massive) and the data on it can't be shared. So, I used the tomato/lettuce sheet as an example.
If I'm getting you right, this is what you want

c2: =OFFSET(INDIRECT(C1),0,1)
c3: =OFFSET(INDIRECT(C1),1,1)
 
Upvote 0
The formula in question is =CELL("address",INDEX($A$10:$A$173,MATCH("*"&D6&"*",$A$10:$A$173,0)))
That formula could never result in $D$4. However, if you wanted the values from the cell to the right (& one below that) for what that formula would return, then these two non-volatile formulas should give you those results without the need for OFFSET or INDIRECT or even that CELL("address" formula.
Excel Formula:
=INDEX($B$6:$B$173,MATCH("*"&D6&"*",$A$6:$A$173,0))
Excel Formula:
=INDEX($B$6:$B$173,MATCH("*"&D6&"*",$A$6:$A$173,0)+1)
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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