Is it possible to do a "if-ever" in excel? - excel

Okay I'm not sure what the official name for what I want is so I will refer to it as an "if-ever" function.
Basically I want to say if a certain cell is equal to a certain value at any point then another designated cell will return a certain value if the original cell is change the designated cell will still return the same value.
An example to make this clear:
Let cell A1 be =randbetween(0,10) now refreshing the formulas will return a random integer from {0,1,2,...,10}.
Now I want to say if A1 is ever equal to 5 for instance then cell A2 will return the value 5 (or any other number/words) and will be fixed, i.e. should we then in the future change A1, A2 will still remain with the value 5 (or whatever else we used).
Hopefully this is clear what I want.
Is this even possible and how would I achieve something like this in excel?
Thanks for reading!

Just with plain excel the answer is NO.
The formulas will recalculate every time. However, with VBA it is possible.
Press Ctrl+F11 and give it a try. You need to explore the Worksheet_Change event and to make sure that it checks a specific target for the value. Then simply change the target and that's it.
https://msdn.microsoft.com/en-us/vba/excel-vba/articles/worksheet-change-event-excel

Related

Excel Fill alphanumeric values

I would like to fill A000001, A000002, till A100000.
Now do it by dragging the fill handle.
I also tried to fill using Step Value and Stop Value. It works for 1,2,3 to 100000. But it does not work for alphanumeric filling like A000001, A000002 etc
Use the step value method to generate 1 to 100000 in column A (from cell A1). And paste the below formula in cell B1,
=IF(LEN(A1)=1,"A00000"&A1,IF(LEN(A1)=2,"A0000"&A1,IF(LEN(A1)=3,"A000"&A1,IF(LEN(A1)=4,"A00"&A1,IF(LEN(A1)=5,"A0"&A1,IF(LEN(A1)=6,"A"&A1))))))
Just double click the fill handle in B1 to generate for the entire range. This is a simpler way of doing this. Hope this helps.
The standard method is Create custom list but since you are looking for a long one so practically impossible,, another is Flash Fill,, and older one is write A000001 in cell A000002 in below cell select both drag it till you need.
I know its too late, however I can provide a tip it may be helpful to someone looking for same issue.
if you want fill the alpha numeric series by dragging the fill handle, just need to add a simple formula in the first row:
="A"&TEXT(ROWS($1:1),"000000")
In the above formula: the text “A” is constant, you can change them to your needed text, and the number “000000” is the variable which will be increased by dragging the fill handle.
Also if you want to add a string at end , you just need to change the formula to this,
="A"&TEXT(ROWS($1:1),"000000")&"-VAL"
Then it will give you something like this,
A000001-VAL, A000002-VAL, A000003-VAL.....
You can also change the starting number too.
Regards

how to use value in cell to count up to a number

I need help with a formula.
I have a spreadsheet where the user enters an integer in one cell. i need to use that value to place a formula in another cell.
so, for example, user enters 24 in the cell. I need it to place a simple sum formula in the 24th cell of the row immediately to the left and highlight it red.
is there any way to do this?
You would put the SUM formula in an IF() function that is true when the row = the value in the cell:
=IF(ROW()=$E$2,$E$3-SUM($B$1:$B1),"")
OFFSET may be a great option here.
If I understand what you are saying, based on your comment to #ScottCraner's answer, you can use this formula in say P4 or wherever really.
=P3-SUM(OFFSET(P4,0,0,P3,1)
This will work if you do not need the formula to be exactly in the cell P28 or wherever it's defined, but just want to SUM the number of payments based on the trigger in P3.

Excel cell showing value from formula while still allowing manual entry

I have a column of cells populated through a VLOOKUP. However, I've now been asked to make those cells allow for a manual override, while still showing the VLOOKUP value if there's no override.
Unfortunately there's a requirement to have the override entered in the same cell - otherwise I'd just add a couple of helper columns and it'd be trivial.
Is there another way to let a cell show a formula-based value, accept an override and restore the formula if there's no manual value?
The usual practice is to use an extra cell. For example, put the Vlookup() formula in cell B1 and the override value in cell C1,
Then in A1 enter:
=IF(C1="",B1,C1)
This allows A1 to display either the Vlookup() or the override (if it has been entered)
As mentioned, there'd no way to make it automatically restore the formula; you have to do it using VBA; I recommend a Command Button with a script that resets the cell.
If you want to have minimal reliance on VBA, and not lose the formula, you could set it so that the result is actually calculated in a cell hidden elsewhere, and the cell that the user inputs to just points there automatically.

Make excel cell equal certain value from a different cell

This should be an easy one but I cannot figure it out for the life of me. I want to change a cell's value from another cell based on an IF statement.
I have
=IF(ISNUMBER(I2/J2),"K2"=I2/J2,Null)
This formula is in L2. I'm trying to get K2 to be the value of I2/J2 but it's evaluating it as T/F.
How do I "remotely" set a cell value please?
Your formula needs to go into K2. You can't remotely set a value of another cell. In K2 put =IF(ISNUMBER(I2/J2),I2/J2,Null)
...although I'm not sure why you are testing that the result of a division is a number. It's either a number or it's an error. Perhaps =IF(ISERROR(I2/J2),I2/J2,Null) would be more appropriate.

Can I Pass one cell value as formula into another cell by equal?

Here I am going to ask one funny question that is in excel sheet,
Let's consider Cell B3 contain value as 3*35, and cell C3 value is =B3 as show below
But my funny expectation is when set C3 value is =B3 it must show C3 value as 105 (I mean I want to make it relevant to C3=3*35 => 105 ) is it possible.
I hope viewer will understand my question.
first of all, typing =3*35 in a cell by itself would have given you the answer right away.
either your question is missing something, like the reason why you want to do it the way you described or you have overlooked something, like using a proper formula.
anyway from your description it sounds like what you want to do is to take a text representation of a formula and then tell excel to calculate it.
if thats what you want then take a look at this question:
How to turn a string formula into a "real" formula

Resources