Calculating a difference in numbers [closed] - excel

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I'm trying to calculate a difference in numbers with Excel 2010. Let's say I have four cells (110, 108, 106 and 104). It's pretty clear that the difference between the four numbers in total (so starting and ending one) is 6. This is the answer I want in the fifth cell; 6. However, if I add another cell between cell 4 and 5 (4 being the lowest number and 5 being the difference), I want the newly created 6 cell (the old 5 - difference answer) to also include the new fifth cell, which is - for example - 100, making the difference 10.

=MAX(A1:A4)-MIN(A1:A4)
will return the answer you're looking for, and the ranges will dynamically update if you insert cells into the A1:A4 range.

Related

How to automate the creation of a list based on an integer input in Excel [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
This is undoubtedly a very simple problem, but I don't have much experience with coding in Excel.
In this example, I would like the user to input the # of students into cell B3.
After inputting the # into the cell (for example, if the person input 5), I would like to create that number of rows from A4-A9 based on the notation Student_# (Student_1, Student_2, Student_3, Student_4, Student_5).
If the person put in 10, I would like there to be 10 rows of Student_1 through Student_10 (updated automatically).
The "Student_" will be static as this is an unidentified list, I'd just like to create the number of rows based on this initial input value.
Thanks in advance for any help.
In A5 put:
=IF(ROW(A1)<=$B$3,"Student_" & ROW(A1),"")
And copy down enough to cover the largest number allowed in B3
If one has the Dynamic Array formula simply put:
="Student_"&SEQUENCE(B3)
In A5 and Excel will spill the results down.

Looking for a formula that recognises different digits in a cell [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am creating a spreadsheet where the user can enter different numbers and have a different result be returned.
For example if they were to enter a number that started 07, it would show 1, 070 it would show 2, 0345 3 and so on.
I have tried the IF and LEFT formulas but I am struggling!
Any ideas are greatly appreciated!
EDIT: Sorry I was trying not to write war and peace but have missed out too much.
The users will write in phone area codes, e.g. 0345 or 0714 or 0701 and the sheet will return the price.
The price can be different depending on the first 4 digits. To keep it simple for this purpose I want it to be able to detect if the area code starts with 07 to show a "price" of 1, 070 price of 2 and 0345 a price of 3.
I have 10 different area codes but just added the 3 above for examples.
I hope this is clearer.
To get the length of a string with the leading zeros removed use the array function
=LEN(MID(A2,MATCH(TRUE,(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)<>"0"),0),LEN(A2)))
Replace A2 with the cell that the users will change and hit [Ctrl Shift Enter] on the cell with the formula to activate the array function.

Excel Number Separation [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Need help on make excel number format to a list of numbers.
For example:
1-3
to become below on different rows.
1
2
3
If anyone could help
A solution with a formula only:
We assume that A1=1-3. Fill the following formula into A2 and copy it down.
=IF(A1<>"",IF(ISNUMBER(A1),IF(A1+1<=VALUE(RIGHT(A$1,LEN(A$1)-FIND("-",A$1))),A1+1,""),VALUE(LEFT(A$1,FIND("-",A$1)-1))),"")
The result will be
1
2
3
This works for any numbers devided by -.

Numbering a column of mixed items [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have a column with multiple labels that I need to number. eg:
A|1
B|1
C|1
A|2
B|2
B|3
C|2
A|3
A|4
So each A gets listed 1 through 4 even though there are Bs and Cs in between. The Bs and Cs also need to get numbered.
If the first letter is in A2, place this formula in B2 and copy down to the last letter:
=COUNTIF(A$2:A2,A2)
What this does is place the count of all the prior occurrences of the letter on the current row (including the current row) in the cell.

excel latest n rows [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm trying to retrieve the values of the latest 6 rows that are not blank. As you can see in the picture, I would get all values from 54 to 39, but if the two blank cells had numbers, then counting would stop at 45.
Visullay
On an other tab I have an INDEX function that attempts to grab these numbers but only works for the first value found.
This for example gives 54, the first value. =INDEX(Database!b5:b50,MATCH(TRUE,INDEX((Database!b5:b50<>0),0),0))
I would like to extend this and use it to call any nth value, preferably the top 6. So every time I update the dates and add new value, the top 6 cells auto update.
You are almost there. Just add a +n to the last argument of the outer INDEX formula. For example, this gets the next item, 51:
=INDEX(database!B5:B50,MATCH(TRUE,INDEX((database!B5:B50<>0),0),0)+1)

Resources