I'm using Excel 2003 and I'm trying to autofill a basic formula but it's not working properly for me.
The formula I'm trying to drag accross takes the value in B2 and adds it to the previous cells value. So the value in F10 is E10+B2 etc. I entered it manually for the first 7 cells and then when I try and drag it accross it starts to reference cells C2, D2, E2 etc. when it should just stay B2.
It does this even though I highlighted a group of previous cells where B2 clearly remains the same.
How to get around this?
You need to tell Excel to use an absolute cell. When you copy the formula across, the E10 cell changes to F10, G10 etc. Problem is though, the B2 reference changes to C2, D2 etc. To fix, change it to $B$2 - this will prevent horizontal copying from changing the B. It will also prevent vertical copying from changing the 2.
Related
For example I created conditional formatting using formula with red, but after I finishing this I copy all the way to the right, selecting cells to apply to ; It worked when I dragged them to the right But it does not work when I drag down.
Here is my formula
Here is my table
So I did this manually I also tried CONTROL+C and PASTE formats
The problem is I changed references on top I do not know starting reference what should be and every time I wanna apply to both rows and columns what formula should I write?
If you have equal spaces between low and high blocks of data, you can use offset inside condition
Select columns E:J
New Rule > Use formula
Type formula: =E1>OFFSET(E1,-7,0) (7 is a distance between each lower and higher cell to check
Set desired color and press ok
Since formula relative so will update for each cell
Your conditional formula has absolute references to the row: E$13 > E$6
But the "Applies to" describes cells all in a single row. So locking the formula to refer to a specific row makes no difference. (If anyone can word a clearer explanation please submit an edit!)
If you change the formulas to E13 > E6 you should be able to copy the formatting across and down your sheet.
Make the formula correct for the first cell in "Applies to", and Excel will apply it to the rest of the range as if you'd copied and pasted it.
So you could probably set a single rule: E11 > E4, and apply it to all the blocks: E11:F13;I11:J13;E17:F19;I17:J19;...
I am creating a report document which will automatically calculate the total marks earned by a student in a classroom. The values to be multiplied are in cell B22 and E22 of Sheet1, Sheet2, Sheet3 and to display the result in Sheet4. Sheet1, Sheet2 and Sheet 3 have the same formatting and design. What is the method or Formula that can be used to multiply;
B22*E22 in Sheet1 which will display the result in sheet4,
and when i use the auto fill handle on the cell containing the result in sheet4, excel should follow that pattern to multiply the same cells across the various sheets automatically;
let's say
B22*E22 in Sheet2
B22*E22 in Sheet3
and so on...
I have tried calculating it manually;
Let's say on Sheet4 in Cell A1, i used
='Sheet1'!B22*'Sheet1'!E22
in Cell A2, ='Sheet2'!B22*'Sheet2'!E22
in Cell A3, ='Sheet3'!B22*'Sheet3'!E22
and it worked. But the problem here is that, this work is purely manual and time consuming since i have a lot of sheets (about 62 sheets) and a lot of other cell calculations to make similar to that above (in other workbooks).
When i input the formula ='Sheet1'!B22*'Sheet1'!E22 in cell A1,
i tried using the auto fill handle to drag and fill the cells A2 and A3.
But it didn't work as excel keeps changing the cell references.
This is the formula i used which works on Sheet4
in A1 ='Sheet1'!B22*'Sheet1'!E22
When i use the auto fill handle, to fill the formula and have the values in
A2, this is what it gives ='Sheet1'!B23*'Sheet1'!E23
A3, this gives ='Sheet1'!B24*'Sheet1'!E24
I want a formula or method through which when i use the field handle, excel should Maintain the Cells reference for calculation (Multiplication), that is,
B22 and E22
and rather change the sheets instead. That is,
On Sheet4, in cell A1: ='Sheet1'!B22*'Sheet1'!E22
A2: ='Sheet2'!B22*'Sheet2'!E22
A3: ='Sheet3'!B22*'Sheet3'!E22.
The formulae above is the result i expect to have.
But the actual output is
On Sheet4, in cell
A1: ='Sheet1'!B22*'Sheet1'!E22
A2: ='Sheet1'!B23*'Sheet1'!E23
A3: ='Sheet1'!B24*'Sheet1'!E24.
Any help/clue will be highly appreciated!
Thanks in advance.!
=INDIRECT("'Sheet"&ROW(A1)&"'!B22")*INDIRECT("'Sheet"&ROW(A1)&"'!E22")
Place the above formula in an empty cell then copy down.
The INDIRECT function converts text with references to an excel reference. Something to be aware of though is that INDIRECT is a volatile function. This is not the end of the world. A volatile function simply means it recalculates anytime anything in the workbook changes. A regular function will only recalculate when something that affects it changes. In other words, if you have a workbook full of volatile functions you may notice some performance issues with the workbook due to all the calculation happening anytime a cell was changed
Update
Apparently I should listen to my own write up. INDIRECT converts references. Apparently it will not work with the math operator. So use indirect for each reference and keep your math operators out of the indirect.
The above image shows a copy and paste of the above formula. IF the sheet does not exist it will toss an error as it does not have an address to find.
So lots of options shown working, B22 left blank to prove calculation works.
Used multiply instead of add as that was what you had, also changed "" to 0 to get the correct functionality.
My Data:
I am trying to replicate the answer/formula from Column H. This is an array formula, so I committed it with Ctrl+Shift+Enter (C+S+E going forward).
My formula (in H2) is:
=MAX(IF(Sheet1!$X$3:$X$94=Sheet4!A2,Sheet1!$AI$3:$AI$94))
Columns I:L are different options I tried to replicate.
Column I: I highlighted the relevant cells, then put the above formula (from H2) in cell I2, and then used C+S+E. The result is 2 the entire way through.
Examining the differences between the formula between cells H5 and I5 shows that the reference "Sheet4!A2" is different.
In Column H, the cell reference is "Sheet4!A5", which is correct.
In I5, the reference is "Sheet4!A2, which is incorrect.
To get past this, I tried to write the formula in Column J, and drag it down, which resulted in all errors.
Columns K and L are instances where I tried typing in the formula, highlighting my range, and then pressing C+S+E, either by hand (Column K), or moving between sheets and highlighting relevant references (Column L). The same issue arose.
I even tried highlighting Column H, editing Cell H2, and the hit C+S+E. I got the same result as I did in Column I.
I looked at Excel Array Formula and Excel: Array Formula Calculates Once, but those suggestions did not help me in this instance.
Automatic calculation is on in my spreadsheet.
You need to understand that when you have selected more than one cell, enter a formula and confirm with CSE, it is totally different than having just one cell selected, enter the formula and CSE.
In your scenario, you want to select just one cell. Enter the formula, confirm with CSE, then copy the formula down. The references that are preceded with a $ sign will stay the same. The references without a $ sign will be adjusted when the formula is copied.
You may want to refresh you knowledge about relative and absolute reference, for example here
The title pretty much says it. I need to transfer certain cells from one cell to another without the coordinates of the cells changing after an insert operation.
In ex., I want the value of cell B3 of Sheet1 to transfer to cell A2 of Sheet2. If I insert a column on the left of B3, the previous B3 will become C3 and you now have a new B3 in which you can add a new value. I want my A2 to still receive the value of B3, but the new B3, not the old B3 with is now C3.
If I go with +Sheet1!B3, after the insertion of the column it will become +Sheet1!C3. I want it to remain to +Sheet1!B3.
I tried with $, +Sheet1!$B$3, but it still changes.
You can use the indirect function in excel.
+INDIRECT("Sheet1!B3")
With the caveat that you never change the location of column A you could do the following:
=INDEX(Sheet1!$A:$$ZZ,ROW(B3),2)
Caveat: as set up will only work for cells between and including columns A and ZZ. the ZZ reference will increase as columns get added. If you have columns outside of ZZ initially, then you will have to adjust the final column reference to suit your needs.
INDEX gave me some errors in the function (probably on my end), but I managed to solve it using INDIRECT.
Ty for the feedback, #AlexCollins #ForwardEd
In Excel I want to copy a formula down and control the relative cell reference.
For example
In A1 if the formula was =B1 and I copied the A1 formula down to A3 the formula in A3 would be =B3. Is there a way of copying the formula in A1 to A3 and have it equal B2?
That's the default copying behaviour in Excel. Did you try it? In fact, if you want to disable it, you have to write $ in front of the fixed row and/or column denominator, so for example $E$1 would be fixed when copied (useful for things that remain constant).
Edit: I think I can imagine what happens: You probably tried to copy the cell contents from the formula editor field. Copy the cell instead, so just mark the cell in the grid by highlighting it, copy it, highlight your target and paste.
Edit2: And please note that you can just drag the little square at the edge of a highlighted cell to apply that cell's formula to an entire area, using the same relative referencing as with copying.