Creating a cell that updates to new value using multiple factors - excel

I was wondering if it is possible to create a formula that updates a cell that needs to update based on both numbers and letters or would I need to create a code in VBA. What I need now is for the following values to update when the information is entered in to a designated cell:
If AA0 is entered in cell A1, then AA1 should populate in cell A2, (I would like to use AA0 all the way through AA9, and then go to AB0, which would then go to AC0 when AB9 is entered, and then if AZ9 is entered go to BA0 (I am hoping I am making since) when any of those values are entered in the cell. I had tremendous help on here before for a similar question but this involves all three digits/numbers in the cell as a determining factor and I am struggling with a formula for it. Thank you all in advance for any assistance.
Edited to add: Everything would just be entered into one cell. So if someone entered in A1 BC4, A2 would update to BC5. I wouldn't need a running list, this is to keep track of what the previous value used was.
Edit 2 adding photos for clarity:

If you always start at AA0 put this in the first cell and copy down:
=LEFT(ADDRESS(1,INT((ROW(1:1)-1)/10)+27,4),2)&MOD(ROW(1:1)-1,10)
If you want the start to be dynamic then put this in A2 and copy down:
=IF(AND(MID(A1,2,1) = "Z",RIGHT(A1)="9"),CHAR(CODE(LEFT(A1))+1),LEFT(A1))&IF(AND(MID(A1,2,1) = "Z",RIGHT(A1)="9"),"A",IF(RIGHT(A1)="9",CHAR(CODE(MID(A1,2,1))+1),MID(A1,2,1)))&IF(RIGHT(A1)="9","0",RIGHT(A1)+1)

Related

Is there a way to add a formula to unique data points in excel?

I am trying to clean some data with this format:
A1 B1 C1
"0,1,0,E,1" "0,0,0,E" "0,1,1,1,2,E"
To obtain the information, I will need to sum up each cell individually, and then calculate the sum over a row.
So far, I have replaced all of the "E"s (for empty) with no data, which removed the E's, and I have replaced all of the commas with "+" signs to add the numbers in the cell. To run the formula of each cell, I will need to now place an "=" in front of each text string, however, if I copy it in with something like "="="&A1" the formula will not run because excel is reading the = as a letter or symbol and not an operator. Do you know of a way to fix this problem?
Thank you so much!
I think this will work for your version ...
=SUM(FILTERXML("<d><c>" & SUBSTITUTE(A1,",","</c><c>") & "</c></d>","//c"))
That's applied like below ...
... there's always someone smarter than me but that seems to work.
It’s not an in place replacement but it keeps your source data intact and provides a nice reconciliation point.
Using a separate sheet for each column of values, given data in cell A1 of
0,0,0,1,0,1,1,E,1,0
In C1, enter the formula
=IFERROR(MID(SUBSTITUTE(SUBSTITUTE($E$14,",",""),"E",""),COLUMN()-2,1)*1, "")
and drag the fill handle to to the right for as many cells as the longest number of data points you have.
Enter your SUM()formula in B1 (you can use the shortcut ALT + =).
Have you tried something like this, please refer the image, where its showing as per your required output, three alternative formulas
1.) Formula used in cell B2
=SUMPRODUCT(IFERROR(--MID($A2,ROW(INDIRECT("1:"&LEN($A2))),1),0))
2.) Formula used in cell D2
=SUMPRODUCT(IFERROR(--MID($C2,SEQUENCE(LEN($C2)),1),0))
The 2nd formula is applicable to Excel 2021 & O365 Users only
3.) Formula used in cell F2
=SUM(IFERROR(--MID($E2,ROW($1:$1000),1),0))
This is an array formula, so requires to press CTRL SHIFT ENTER !
Here is an update, the last formulas, which i have shared, shall work only when the digits are less than 10, however the present formula, shall work for all number of digits,
Formula used in cell B17
=SUMPRODUCT(IFERROR(--MID(SUBSTITUTE($A17,",",REPT(" ",100)),COLUMN(A1:Z1)*99-98,100),0))
Please adjust your range accordingly as per your data.

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.

VBA to shift formula reference down one row

I'm currently working on a massive file, that compares year/year data.
Every week I need to update a formula in the file to move down a row. I want to make a command button to update these formulas.
Here is a simple example
cell c800 contains: =((C235-C229)/C229)*100
I would like to click the button to make the cell update to
=((C236-C330)/C330)*100
Can anyone help me out here? is this possible? I've been looking all over for this and can't find anything.
thanks
Enter this formula in C800 and it will always capture any newly added lines of data.
=(INDEX(C5:C799,MATCH(1E+99,C5:C779,1))-INDEX(C5:C799,MATCH(1E+99,C5:C779,1)-6))/INDEX(C5:C799,MATCH(1E+99,C5:C779,1)-6)*100
assumes first data point is in C5. Change as needed
This works because MATCH(1E+99,C5:C799,-1) finds the last numerical value in the column.
there is a function to do that, as if the cell containing the formula was copied somewhere else and the cell references in the formula were shifted/moved:
strFormulaMoved$ = Application.ConvertFormula(Application.ConvertFormula(Selection.Formula, XlReferenceStyle.xlA1, XlReferenceStyle.xlR1C1, , Range("C800")), XlReferenceStyle.xlR1C1, XlReferenceStyle.xlA1, , Range("C800").Offset(1, 0))

I am trying to make a spreadsheet on Excel that will work out the average of an input in the same cell

Hi i have a spreadsheet to calculate the averages of my players in Fifa game to game. I need a to be able to input a number to a cell and it will calculate the average of that input and the past inputs in that cell.
If you want to avoid VBA, you can achieve this using circular references. The following solution works with the following scenario:
You're putting the data in cell A2 (you can change this)
You're never putting in a value of 0
You're never putting in the same value twice in a row
The average will be displayed in B2 (you can change this)
You only need to store 20 values (you can extend this)
The history is stored in C2:C21 (you can extend this)
(If you are putting in the same value twice in row, you can't even achieve this using VBA easily without also adding a button that needs to be pressed manually every time, because VBA needs to see a change in value to know when it's been updated.)
To set this up, follow these steps:
Ensure cell A2 is empty before you start
Go to File > Options > Formulas and put a tick against Enable Iterative Calculation at the top right (this allows circular references)
Put this formula into B2: =AVERAGEIF(C2:C21,">0")
Put a heading into C1, such as "History"
Put this formula into C2: =IF($A$2=0,0,IF(AND(C2=0,C1<>0,C1<>$A$2),$A$2,C2))
Fill the formula down to C21
You can now start entering values into A2 and each new value will be added to the list automatically.
To reset the list, put 0 into A2

What is wrong with this Excel formula to sum() next 2 columns in the same row?

I did try to enter in a cell formula:
=SUM(ADDRESS(ROW(),COLUMN()+1):ADDRESS(ROW(),COLUMN()+2))
Intention is summing next 2 cell in the same row.
But the spreadsheet complains with error on it!
Used functions: ADDRESS(ROW(),COLUMN()+1). Work fine but together - not!
In B7 cell:
(I need to write a generic formula that is independent from location and calculates the sum of the next tho cell in the same row.
I am not interested in specific addresses or in a way to copy any specifically written formula across a spreadsheet.
I need a formula that works independently from a location!
Is it possible in Excel at all?)
Thanks.
ADDRESS returns address as a string. You cannot SUM it because SUM(A2:A3) is very different from SUM("A2:A3").
You could look into SUM(INDIRECT("A2:A3")), but you should not, for the mere reason that Excel's formulas are already relative unless made absolute.
If you want to sum two cells to the right of B7, enter =SUM(C7:D7) to B7. The formula will change if you copy it to another cell.
If you meant to enter the formula with a macro, then use the R1C1 notation and enter =SUM(RC[1]:RC[2]).
sorry im dont speak english , but a have what you need
= SUM(INDIRECT(CONCATENATE(ADDRESS(ROW();COLUMN()+1);":"; ADDRESS(ROW();COLUMN()+2))))
Regards

Resources