Find Cell Value Utilizing Cell Name In Another Cell - excel

Say I have a cell (A1) with the text "n25". In another cell, I want to find the value of the cell defined in A1 in another cell, lets say A2. In other words how do I put =(text from another cell, in this case "n25", which would then return me the value in cell n25). The reason I ask is because the cell containing n25 will be dynamic as data changes (it can be n26 in which all other cells would update).

Use
=INDIRECT(address_of_cell_with_reference_to_another_cell)

Yes, try:
=INDIRECT(A1)
This will return the value from N25.

Related

Google Sheets or Excel: setting the value of a remote cell from a formula

Is there a way to create a formula in one cell that will change the value in another cell based on some criteria, without scripting? Example: cell a1 contains a numerical value. cell b1 contains a value from a drop-down list, say, "YES,NO". If cell b1 is set to "YES" I want to remove (set to zero) the value in cell a1. What I'd like to do is have a formula in cell c1 that interrogates b1 and sets the value in a1 accordingly. Is the only way achieve this writing code and using setValue?
you cant remove it without a script. you can visually hide it in various ways. if the A1 is subject of further sum (as in your case per your comment) the sum formula can be always altered to reflect desired output. example:
if your formula is
=SUM(A1, C5, D22)
you can do
=SUM(IF(B1="YES", 0, A1), C5, D22)
Use the following on the cell you need the calculation (or zero) on:
=IF (B1="YES",0,SUM(A:A))
Using the given formula, you would do the SUM calculation for the whole Column A if the value on B1 is "YES", if not, then a 0 would be placed on the cell you put the formula on.

How to replace the value of one cell with another based on whether a word exists in a specific cell

I have a basic question. I have a one column which represents a quantity. The cell to the right is a new column that will contain a word. I want to search cells in one column for the word and if it appears replace the word, let's say "foil" with the value of the cell to the left. A2 represents the cell A2, and I am checking B2. This formula is not working. I want the value of cell A2, not literally "A2"
=IFERROR(IF(SEARCH("*foil*",B2,1),"A2"),"0")
Thank you so much for your help! I really appreciate any and all help with this.
While you are using SEARCH() function you do not need to use wild card. Remove double quote from "A2" so that formula can show data of A2 cell instead of text A2. See below...
=IFERROR(IF(SEARCH("Foil",B2,1),A2),0)

Convert Cell reference to the Cell Name Not Value

I want to display the reference of cell based on condition that if the cell contains a value it should display that the cell has a value for example
If cell A1 has a value eg 12, then cell B1 should display “There is value in cell A1” else it should be blank
I have tried this this
=IF(A1="","","There is value in cell "&A1).
Does anyone know how I can change it to =There is value in cell A1
Instead of There is value in cell 12
Something like this
=IF(A1="","","There is value in cell "&ADDRESS(ROW(A1),COLUMN(A1),4))
Also if you don't have any issue with the volatility an easier formula would be
=IF(A1="","","There is value in cell "&CELL("address",A1))
P.S You can additionally use one of the four values as the last parameter in the first formula.
Does this do the trick:
=IF(A1<>"","There is a value in cell "&CHAR(64+COLUMN(A1))&ROW(A1),"")
You can also use ADDRESS():
=IF(A1<>"","There is a value in cell "&ADDRESS(ROW(A1),COLUMN(A1),4))
It takes row and column as arguments with optional argument for return type, that is set to relative in this example.

How do i refer to a cell in a specific column but the row is determined by input in other cell

I want a cell to display a value from a list elsewhere in my sheet.
The user inputs a value lets say 50 in cell A1. in that case i want cell B1 to display the value given in cell X50.
when the user enters a 61 in cell A2 i want B2 to display the value of X61
When knowing the column and sheet using the nonvolatile INDEX() function is an advantage.
Indirect is a volatile function, meaning that it recomputes every time excel recomputes whether the data for which it refers changed or not. If the workbook is filled with indirect function it will slow down the computation time.
The following INDEX Formula will only recompute when the data to which it refers changes.
In B1 put:
=INDEX(X:X,A1)
Then copy down the desired number of rows. The A1 will change To A2 and so forth.
This is possible with use of INDIRECT()... How can you use it? Simply do this
Type the following in you cell B1:
=INDIRECT("X"&A1)
And in you B2 type this:
=INDIRECT("X"&A2)

Excel formula to find reference used by other cell

Is there a way to find out the address of the cell being referenced in another cell in excel?
E.g. cell C1 contains formula =max(A:A) and returns a value of 10 which is actually referenced to cell A10. Can I use a formula in cell B that returns 'A10'?
And no, I don't want to use VBA at all.
Assuming that your entries are in Cells A1:A7, you can do it this way ...
In Cell B1, the formula =MAX(A1:A7) and
in Cell B2, the cell location of the maximum number in the range (shown in B1) is given by the formula
=CELL("address",INDEX(A1:A7,MATCH(MAX(A1:A7),A1:A7,0)))
OR
=ADDRESS(MATCH(MAX(A1:A7),$A$1:A7,0),1)
Mark as answer if it helps.
Managed to find the solution:
Similar to Kyle's formula, but instead we use match with multiple criteria to be more specific e.g.
=ADDRESS(MATCH(MAX(A1:A7)&"A",$A$1:A7&$B$1:$B$7,0),1)

Resources