How to avoid manually entering this formula in Excel - excel

I'm trying to calculate a value called, "additional throughput". It is calculated by subtracting the base case module's throughput from a new module's throughput.
In the sheet below you can see that for the third row down (has a blue box in it), that the additional throughput is calculated by the formula "=T6-T4".
The problem is that when I click on this box and drag it down to apply the same formula to the other rows, I want the formula to become "=T7-T4" for the next row. Instead it becomes "=T7-T5". I tried to select multiple cells (where the formula was manually entered) before dragging down so it could recognize that the T4 doesn't change, only the first part. However, that didn't work.

In Excel you can use $ signs before the column or row references to make those references "absolute" (rather than "relative"). For example if you use =A$1 then the 1 doesn't change when you copy down. If you use =$A1 then the A doesn't change when you copy across. If you use =$A$1 then neither changes whichever way you go.
So for your case you need to use
=T6-T$4
when you copy that down T$4 doesn't change

You have to make the cell address of T4absolute by pressing F4, so it becomes $T$4. When you then copy the formular to other places T4 will keep its absolute address.

I figured it out.
You put a $ symbol in front of the row and column you want to not change. This is referred to as an absolute reference.
Found out how to do it here:
How do I change an Excel relative cell to an absolute cell?

Related

Special character wanted which prevents an Excel formula from changing its reference when the referenced cell is moved

With the special character '$' I can prevent an Excel formula from changing its reference when the cell itself is copied (e.g '$A$1').
But is there also a special character that prevents an Excel formula from changing its reference when the referenced cell is moved?
Here's an example:
I have:
Now I move the cells 'A1:A3' down one row. So the formulas in the cells 'C1:C3' change:
But I don't want that the formulas in the cells 'C1:C3' change. They should remain unchanged:
Try formula:
=IF(INDEX(A:A,ROW(1:1))=INDEX(B:B,ROW(1:1)),"Same","Not same")
the formula always work, regardless of any column been delete besides columns A or B
If you always want to refer to A1, then you can't just use A1 as a reference, because, as you have seen, Excel will adjust that reference if rows are inserted above.
Instead, use Index(A:A,1) . That will always return the value from the first row of column A.
=if(index(A:A,1)=index(B:B,1),"same","not")
Edit after comment: If this does not suit your purpose, maybe you need to redesign your spreadsheet so that the position of things does not change all the time. This looks like you are adding new data at the top of a list.
Excel works from top to bottom and things will be a lot easier if new data is added at the bottom of a list. You can always use other Excel tools to change the sort order if you want to have the data sorted in reverse chronological order.
Use formula in C1:
=IF(INDEX(A:A,ROW(ZZ1))=INDEX(B:B,ROW(ZZ1)),"Same","Not same")
and copy down.

How to reference every cell of another tab using indirect

I want to create a tab that will display all the cell values of another tab based on the tab name provided on a cell.
I have played around with the indirect function, but I cannot write a formula so that by dragging down and right it will access the cells.
=INDIRECT("'"&$A$1&"'!A1")
This part &$A$1& is getting the name of the tab.
If I drag down this formula, the last A1 does not change though.
You can use the formula ="Sheet2!A1" in Sheet1 Cell A1 and drag down, then across. I tried to find a faster way to paste it into every cell, but I had to force quit the application because it used all of my available memory. You might think about whether you actually need every cell to be duplicated into the second sheet. Good luck!
Edit: Just realized you were dead set on using Indirect. This should work.
=INDIRECT("'Sheet2'!"&CELL("address",A1))
Simply use following formula
=INDIRECT($A$1&"!A" & ROW(1:1))
Try building the string like this. The final A1 will work as you want it to.
=INDIRECT(CONCATENATE("'",$A$1,"'!", CELL("address",A1)))

Copying and Pasting Column with Concat not Working

I have one sheet in excel that I have concatenate values in. But when I try to copy the exact same column for another page it does not copy correctly. It goes from =CONCAT(A!C8,A!D8,"-",A!$F$5) to =CONCAT(A!A2,A!B2,"-",A!$F$5). How do I get it to keep the exact same formula? Thank you.
You know the difference between absolute an relative references in a formula right? The $ symbol before a column in a formula means when you copy to the next column it stays anchored to the original. Without it it becomes relative to the last one. Ditto rows. The only way you can do what I suspect you want is copy/paste the actual formula entry bar rather than the cell itself. If you copy across sheets you may get a sheet reference prefixed that you may or may not want to edit out after pasting. That's the A! in your example.. Sheet A.
Have you tried copy, then on the page you want to paste, "Right-Click" and choose "Paste Special" and choose "Formulas" ??

Change variable horizontally in excel formula

I want to change a variable in an excel formula horizontally and maintain one variable constant.
O3/$C18, P3/$C18, Q3/$C18
I can keep the the bottom variable constant by using the $ symbol but when I want to extend the formula to additional cells, the top variable does not change horizontally, rather vertically.
Thank you for your help. Cheers
The dollar signs in excel "fix" the item to their right
$C18
means C will always be fixed, and 18 can change
C$18 means C can change, but 18 is always fixed.
$C$18 means C is fixed and 18 is fixed (ie always use C18 no matter what direction you drag the cell)
I dont fully understand what you want to do but hopefully the above will help
based on the comments below i think i understand what you mean
try a formula like this
=INDIRECT(ADDRESS(1,ROW()))/$C$18
here address takes the row and column, so row = 1 and column = which ever row you are on (so row1 = A, row2=B etc)
then indirect lets you use that as a reference point
Hope that works
If I understand you correctly, you want to copy your formula vertically, but have the columns update as if you were copying horizontally. For example, you want to copy =O3 to the cell below it as =P3.
For the top, consider the Offset() and Row() functions. Let's say that Cells A1,B1,C1 are 1,2, and 3. Try =OFFSET($A$1,0,ROW()-1). If you copy that formula vertically, the result will be 1, then 2, then 3.
So in your case, try =OFFSET($O$3,0,ROW()-1). It probably needs a little adjustment.
Here's another way to do this:
Start with the formula in this form:
=O$3/$P$18
Copy and paste it across so that you get:
=O$3/$P$18 =P$3/$P$18 =Q$3/$P$18
Copy the two formulas you pasted and select the cell below the first formula.
Then do a Paste Special / Transpose, which can be accessed by right-clicking the selected cell (that is, the one below the first formula that you entered) and then choosing the button that shows a little two-cell range flat and then upright.
Finish up by deleting the formulas in the cells you just copied from.

Using relative positions in Excel formulas

How do I create a formula that isn't made invalid when I delete a row.
For example in cell F12 I have the formula: =F11+D12-E12
This basically says take the value from the cell above then add the value of the cell 2 to the left and subtract the value in the cell directly to the left.
However, because I'm using actual cell addresses, as soon as I delete a row, all the rows below become invalid.
How do i express the formula by relative position (ie = "1 above" + "2 to left" - "1 to left")
Thanks.
You can use either
=OFFSET(F12,-1,0)+OFFSET(F12,0,-2)-OFFSET(F12,0,-1), or
=INDIRECT("F11",true)+INDIRECT("D12",true)-INDIRECT("E12",true)
=INDIRECT("R11C6",false)+INDIRECT("R12C4",false)-INDIRECT("R12C5",false)
=INDIRECT("R[-1]",false)+INDIRECT("C[-2]",false)-INDIRECT("C[-1]",false)
Both functions also allow to specify ranges, just use whatever has your personal preference (see Excel Help)…
You can switch e.g. to the R1C1 reference style (excel options)
Use OFFSET function (e.g. =OFFSET(F12;-1;0) for above)
Reading between the lines... is your actual problem creating a running total from additions and deductions columns?
You can sum each column starting with an absolute reference and ending with a relative reference
Assuming row 11 is your first, put =SUM(D$11:D12)-SUM(E$11:E12) in F12.
As you copy this cell down the absolute reference remains the same where the relative reference automatically updates extending the range. You can even copy the formula up one line and it will work on the first line too.
Deleting and inserting lines doesn't break the formula, though any extra cells would be included in the SUM().

Resources