• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

Excel - How to build a formula with part of the value coming from another cell

I have a completely basic formula in cell H2, for example:  "=A2-B2"

Now I want to dynamically enter a letter in cell A1, e.g. "C" so that the result that I see in H2 is the difference between cell A2 and C2.

Or another way of asking the question:  How can I modify my formula in H2 so that when I enter "C" into cell A1, the formula in H2  changes to "=A2-C2"  ?

My bumbling attempt at trial-and-error for cell H2, in case it clarifies my question:
"=A2-(A1)2"   No joy

Thanks
0
Dwight Baer
Asked:
Dwight Baer
  • 2
  • 2
1 Solution
 
Saqib Husain, SyedEngineerCommented:
=a2-indirect(A1 & "2")
0
 
Dwight BaerAuthor Commented:
Wonderful.  One little thing more ...
How can I modify that so that I can  copy it?  When I copy it into H3, for example, I need to formula to read "=a3-indirect($A$1 & "3")

Thanks again.
0
 
Saqib Husain, SyedEngineerCommented:
"=a3-indirect($A$1 & row())
0
 
Dwight BaerAuthor Commented:
Fantastic!!  Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now