Getting the value of a value of a cell - excel

How can I get the value of the cell in column C row 24-A1, where A1 is the cell A1.
For example, if the value in cell A1 is 4, I want to get the value of cell C20 as the row number is 24 - 4 = 20.
The following fails with a #NAME? error:
=C$(24-A1)

You are looking for the INDIRECT function
=INDIRECT("C"&(24-A1))

You can do this with the OFFSET function
=OFFSET(C24,-A1,0)
This will take the location of cell C24, subtract A1 from the row reference, and add 0 to the column reference.

Related

Add cells value until specific number is reached in Excel

Example:
Cell A1 has a value of 7
Cell B1 has a value of 4
Cell C1 has a value of 3
Cell D1 has a value of 5
Cell E1 has a value of 6
Excel function should add values until my specific value (15) or nearest to or less then to 15 is reached and return answer in a cell. For example excel should return value of 14 after adding Cell A1, B1 and C1. Excell should stop adding values at this point and should start adding the other cells until the 15 threshold and return value in new cell.
Can this be achieved?

Reference an Excel Column based on an Excel cell value

In Excel how can I create a cell function which does the following ...
If cell C1 contains the value 6, I want cell B1 to be the contents of cell M1,
If cell C1 contains the value 7, I want cell B1 to be the contents of cell N1
and so forth, increasing by one column (M,N,O...) at a time.
I've tried with the functions INDEX, IF , MATCH and, LOOKUP .
Use INDEX and simple math:
=INDEX(1:1,C1+7)

Can't find the first row where the cell is greater than a certain value

I have data in column A, with a header "Time" in cell A1. I am trying to locate the address of the first cell in column A where the cell value is greater than 1. This should be in cell A12.
However, when using the following code, I get the cell address of $A$1.
=CELL("address",INDEX(A:A,MATCH(TRUE,INDEX(A:A>1,0),)))
gets the address of the first value that is 1 or greater than 1 in column A
="$A$" & COUNTIF(A:A,"<"&1)+1

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.

Offset with a cell value

I'm trying to do an IF formula that compares the value of an offset cell
leadtime_value2 = Range("H3").Value
ActiveCell.Formula = "=IF('ActiveCell.Offset(leadtime_value2,-1)'=TRUE,F7-C8+$D$1,F7-C8)"
As you can see I'm telling my that my cell to compare is the one the number of times Cell H3 value up in rows (Because H3 is negative) and one column left in the active cell value
H3 value is an input from the user
Could you please tell me the proper syntax for this code?

Resources