Prevent excel updating cell referene with new location - excel

this should be super basic but I can't figure it out.
If I have a series of numbers in A1:A10. And in B1 i have [=A1], B2 [=A2] etc. Simple cell reference.
My problem is that when I select A1:A10 and move them down to A2:A11, the formulas in column B update to reflect the new location. What I want is the reference to be permanently on A1:A10.
I've tied =$A$1, but that too updates to $A$2 when I shift the cells.
How do I break the lock on the values?

It is possible to achieve this using the INDIRECT formula, like this:
B1: =INDIRECT("A1")
B2: =INDIRECT("A2")
...
The references are not updated because they are strings.

Related

Deleting row creating a ref issue in excel

I have a helper column with the following code
=IF(A1<>A2,1-SUM(B1),SUM(B1))
The table looks like
When I delete a row, say row 21 in this example, I end up with a ref issue in cell B21 -
=IF(#REF!<>A21,1-SUM(#REF!),SUM(#REF!))
Is there any way to resolve this, perhaps with a way to sequence the formula in cell B2 such that it automatically runs the calculation and corrects based on rows being removed?
You can use the offset function to avoid this and always make the formula look to the above cell like this:
=IF(OFFSET(A2,-1,0)<>A2,1-SUM(OFFSET(B2,-1,0)),SUM(OFFSET(B2,-1,0)))
This tells to use A2 but 1 row less, making it A1. (And same for B2.)
In B2 use: =IF(INDEX(A:A,ROW()-1)<>INDEX(A:A,ROW()),1-SUM(INDEX(B:B,ROW()-1)),SUM(INDEX(B:B,ROW()-1)))
By using INDEX you can avoid referencing cells that may be deleted, which is causing the issue you have.

Auto Copy and Paste Cell Values not Formula to another Cell

I also need to get your help for the same issue. I need to copy the cell values and not the formulas automatically to the other Cell, "automatically" meaning, I don't need to click, use mouse, or any other means to do that, like once theres a value on that specific cell (which is derived from a formula), the value will automatically be copied and pasted in the other cell (without any intervention from my part) (Only the value is copied not the formula)
Note:
The cell should contain only the copied value and not the formula.
Scenario:
A1 Cell : has 250 value
B1 Cell : has a vlookup formula to search for the value of A1 cell (I need to use VLOOKUP as there's a lot of items in the list, and it is "Dynamic", the reason I cannot just use formula "=A1" to get the value directly)
C1 Cell : Needs to copy and paste only the plain value from B1 cell which is 250, not including the vlookup formula, it should be automatically copied without any intervention (Cannot use VBA code / Macro as it will be run in excel online)
Thanks!!
Just use abasic Excel formula.
Example:
The source data is in cell A1.
You want to copy the same value to cell B1.
In cell B1 write:
=A1
That is all.
Additionally, you need to configure correctly the strategy for calculating the formulas:
I managed to find a solution, sharing as might help someone in the future, just needed to use =value(A1), instead of just "=A1", when I did this, the chart can read the values as it is and not the formula behind it. Found another work around as well, by using the formula =A1+0, for some reason this works too. –
=value(A1) works perfectly , If that formula contains a % figure , simple We can multiply by 100 to get the correct value.

Cell reference to named area, with offset

This is a question about OpenOffice spreadsheet, not Excel.
I have a named range which is a row of cells. (Say, the name in B4, the range C4:K4). I want to put a row of formulas underneath, where each formula references the cell within the named range at the same column. (The formula in C5 references C4, in D5 references D4, etc.).
Of course I could just use standard relative referencing, but I'd prefer to use the range naming.
How to do that?
I've played with COLUMN(), INDEX(), OFFSET(). I just get invalid reference errors.
Supplementary: there's something in Excel where you highlight a cell with relative references, and get it to recast the formulas using range-names. That might be called Names -> Apply IIRC. Is there something comparable in OpenOffice?
Provided your formulae are in columns C:K this is very simple, for example B5:B7 show the formulae in C5:C7 that have been copied across to ColumnK:
Why this is so is difficult to describe, but for Excel Doc.AElstein has attempted an explanation.

EXCEL: When dragging cells to the right I need to use information stored in columns not rows (Not sure how to ask this properly)

It's probably a simple problem, but I did not even know the keywords to google it ;/. Let's say I have this data :
Now I also have this litle formula:
If I know drag the C cell to the right, Excel will attempt the following caluclation:
=2+B1
What I want him to do is to attempt this calculation
=2+A2
Of course the easiest solution would be to store my initial data in one row instead of 1 column, but it is really inconvenient for me. Thanks for any help
You can use the indirect() method to reference a cell by it's "String identifier", i.e. "A3". When filling out to the right, use CONCATENATE() and COLUMN() to create your String identifiers {A1,A2,A3,A4,A5...} as required:
=2+INDIRECT(CONCATENATE("A";COLUMN()-2))
This will result in the following:
Side-Node: If you want this for some x/y-Grid-Generation, you can also be lazy,
and just insert =COLUMN() for every cell from "A1 - Z1" and ROW() for every cell from "A2 - A24".
(Or even avoid these at all and directly perform your actual calculation by using column() and row() as replacement for your x/y.
You may try using a combination of the INDIRECT and COLUMN functions:
=2+INDIRECT("A"&(COLUMN()-2))
You would paste the above formula into cell C1, and then drag across to the right however many columns/rows you wanted to cover.
This would result in the following:
This works because COLUMN()-2 returns 1 for the C column, 2 for the D column, and so on. Therefore, the formula will be calling INDIRECT on A1, A2, etc. for column C, D, and so on.
In general, if you want relative references to move down as cells are dragged to the right, you can use this:
Instead of:
= 2+A1
Do:
= 2+INDEX($A:$A,COLUMN()+<offset>)
Where <offset> is whatever offset you need. The offset will change depending on which column the starting formula is located in.
INDEX should be preferred over INDIRECT because INDIRECT is volatile (must recalculate after any change to the workbook) but INDEX is not (only recalculated when one of the inputs the formula, in this case $A:$A, changes).

Turn off pop-up errors/alerts in MS Excel 2010

I have a table of results in MS Excel 2010 with formulas in each cell that I need to edit. I have INDIRECT cell references in the formulas that do not update when copied to other cells. So, I believe the easiest way in this case for me to edit all the formulas in the table is with two find-and-replaces (changing the beginning and end of each formula to have what I need). However, when I try to do the find and replace, Excel shoots a "The formula you typed contains an error" pop-up at me and refuses to execute the replace. I know there's an error, I'm not finished with the formula yet! So:
1) How can these errors be disabled?
2) Is there a way to make indirect cell references update the way a normal cell reference would (eg. make INDIRECT("'"&F5&"'!L7") update L7 to L8 in the next row) so that I can copy the new formula throughout the table of results, and avoid the find-and-replace entirely?
Sorry guys, I realize this is a somewhat strange question for stackoverflow.
1) I don't know.
2) I'm not 100% sure from the question, but I can think of two scenarios:-
(a) You have a list of references which your INDIRECT formula uses, and you want it to select each one in turn as you pull the formula down. This is trivial so it's probably not what you meant:-
=INDIRECT(A$1&"!"&A2)
assuming your sheet name is in A1 and the references are in A2,A3 etc.
(b) You have a reference to the beginning of a range of cells in sheet2, and when you pull the INDIRECT formula down, you want it to automatically get the next cell in the range:-
=INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(INDIRECT($A$2)),4,1,$A$1),"1","")
&(ROW(INDIRECT($A$2))+ROW()-ROW($C$2)))
where this formula is placed in cell C2 and pulled down.
The idea is that you break the cell reference down into its column name (using the excellent suggestion here ) and its row number, then get the row number to increment using the ROW function.
Sheet 2:-
Sheet 1:-

Resources