In excel, I have created the next simple formula in the cell B1:
=A1
Therefore, the cell B1 allways is showing the content of A1
If I cut the cell A1, and paste in A5, automatically, the formula of B1 changes from =A1 to =A5.
I want to create an static reference to A1, forever, with no automatic changes.
In order to create a static reference, use =INDIRECT("A1"). Indirect turns the address into a string and then refers to it.
Use =$A$1 so neither A nor 1 will be changed :-)
Related
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.
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.
In D2 cell I have a formula referring to D4 cell value.
Then, I drag&drop D4 cell from D4 to C4, and my D2 cell formula changed.
How to "hardcode" this marked reference to D4 (resulting in 0*2=0)?
Is it possible to make it work without vba?
Try this.
=indirect(address(4,4))*2
Use absolute reference like..
=$D$4*2
Since you aren't doing a vlookup to reference the data (Which is the problem I'm having), try using an INDEX with the limits of excel's table of cells as the braces to prevent it from moving, like this:
=(INDEX($1:$1048576,4,4))*2
That prevents the reference from moving. =D
I have a "subscription" column in column A. A1 is "12000". I want C1 to be "A1/12" AND D1 to be "A1/12". However, if I make the formula for C1 "A1/12" and then drag to the right, D1 will try to become "B1/12" which I DO NOT WANT.
I do not just want to make A1 a constant, because I want that when I copy and paste this onto the following rows, C2 and D2 should be "A2/12" and NOT "A1/12".
Thoughts? Sorry for the obfuscated explanation.
Just lock the cell. This is done with dollar signs, or when you put the reference, press F4.
=$A$1/12
And you can drag it without the formula changing the A1.
If you want it to change with changing rows, just lock the column A:
=$A1/12
Use the dollar sign to fix the reference:
=$A$1/12
You might want to have a look at this for more information
http://www.notjustnumbers.co.uk/2011/05/excel-tip-dollar-sign-in-formula-fixing.html
I would like to do the following:
Worksheets("Sheet1").Columns("A2").Select
Where in A2 I have the following formula:
=WEEKNUM(NOW())
The formula can be merged probably.
The reference to cell A2 doesn't work.
Worksheets("Sheet1").Columns(Worksheets("Sheet1").Cells(2, 1).Value).Select
worked for me,... I think you just needed one more level of indirection to dig the value out of A2.