Cell address defined by the contents of other cells - excel

How do you define variable cell address in Excel. For example consider the case where the content of cell A1 is 5, cell A2 is 2, cell A3 is 10 and cell A4 is 1. How do I enter a general formula to SUM the content of the cells A7 (A1+A2) through A9 (A3-A4)? I would then like to drag the formula to columns B through CJ,... and repeat similar calculations noting that values of B1 through CJ4 are different than A1 through A4. I appreciate any suggestions.

=SUM(INDEX(A:A,A1+A2,1):INDEX(A:A,A3-A4))

Related

Highlight A1 if A2 does not equal A1, B1 does not equal B2, and so on

For example, I have A1 that has a formula to add the sum of multiple other cells, then A2 I enter a number each week. A1 and A2 must match, if they don't then a mistake has been made. I want Row 2 to highlight if it does not match. I can figure this out but I cannot figure how to copy that in conditional formatting to apply to B1 and B2, C1 and C2, D1 and D2, E1 and E2, and so on.
From what I understand, you want to have row 2 highlighted if any of the cells in it is different from the corresponding cell in row 1. You do not want to have highlighted only the offending cells.
The only way I know to do it, short of VBA, is to create a helping row, let's say row 3, where you put =A1=A2 in cell A3, then copy it to the entire row. Then, while cell A2 is active, select the entire row 2, and create a conditional formatting rule with formula =NOT(AND(3:3))
UPDATE 03/04/21 Here a faster method (no helping row):
Select the row 2, and in the Conditional Formating, put this formula:
=SUMPRODUCT(-(1:1<>2:2))<0

How to change cell value according to sum

I want to change cell value according to my sum means if i give total 2000 in "A5" than value change automatic in cell range A1 to A4.
It's confusing to answer your question without knowing more.
Assuming you are working in Excel, if you have the following numbers
A1 A2 A3 A4 A5
5 6 7 8 1000
you can set the following formula for A1, A2, etc.
=IF($A$5=2000,*value that you want cells to read, "")
Essentially if the condition on cell A5 is met, in this case reaching 2000, you will change the value of cell A1 - A4 to a specified amount. If it doesn't reach 2000, you will keep the original value.
You could have formulas in A1 to A4 as percentages of A5,
for example,
A1: =0.1*A5
A2: =0.2*A5
A3: =0.3*A5
A4: =0.4*A5

Split one column by rows to multiple columns in Excel

I am working in Excel 2013, and I have data like the following:
A1
A2
A3
B1
B2
B3
(The As go to A13, Bs go to B13, Cs go to C13, and so on until you get to row 2495.)
How do I divide this long column where the 14th row moves to the next column? See below:
A1 B1 C1 ...and so on
A2 B2 C2
A3 B3 C3
...
A13 B13 C13
B1: =INDEX($A:$A,(COLUMNS($A:A)-1)*13+ROWS($1:1))
Fill right to AA1
Select B1:AA1 and fill down to row 13
The above assumes you are going A-Z. But you must have other characters also in order to get to 2495 rows. Your real data may require some tweaks from what I have presented -- either filling down further; or filling further to the right, or using a different constant then 13
If you want to parse the data into three separate columns then in B1 enter:
=A1
In C1 enter:
=A14
In D1 enter:
=A27
Then copy these three cells downwards:

An Excel formula or custom function for an unknown relating to 2 knowns

Is it possible for a formula or custom function in cell C1 using the values in A1 and B1.
Cell A1 has a value of 2600.
Cell B1 has a value of 25 (format percentage).
Cell C1 has a value of 3467.
Cell D1 has a formula of =C1-A1 with a result of 867.
Cell E1 has a formula of =D1/C1 with a result of 25 (format percentage).
I am at present changing the value in cell C1 until the required 25% is achieved in cell E1.
I hope this makes sense, thank you for reading.
Please try in cell C1:
=A1/(1-B1)

Setting a cell to a value of another cell IF another cell was value X

Is there a formula in excel to allow you to obtain the value of another cell WHEN a second cell was value X?
For example, something like:
=GETWHEN(A1,3,B2)
Which would return B2's cell value when A1 is value 3.
So if let's say you had a cell B2=4*B1. And B1 you set to 3, so B2 would show 12. But I want to make a row of entries to plot what B2 will be when A1 is 1, 2, 3, 4, 5 etc...
What could I put under A1 Values?
EDIT: I'm not looking for a if like in the conditional sense. I'm looking for the value WHEN (edited now)
You're thinking about data tables.
Provided you have your values in E2:E6, and your formula in B2:
Enter =B2 in cell F1.
Select E1:F6.
Go Data - Data table and put B1 into the Row input cell box (B1 being the cell on which B2 depends).

Resources