Microsoft Excel 2010: Help making a Formula to up Values by a repeating pattern - excel

I have a Spreadsheet, and inside this sheet contains a column with numbers, I want to make a formula that will go down that Column and do basically this.. Values: 1 will be 9.50. 2 will be 9.75. 3 will be 10.00. Ect going up to Value of 100? Is that possible for a Formula? I keep playing with it but can't really seem to get it down. Any help would be appreciated.
Column A: 1
1
1
1
1
2
2
2
2
2
2
2
2
2
3
3
3
3
There is not a set amount to how many values are in there.

this should do it supposing that column A has these values 1, 2 ...etc that your computing will be based on
=MIN(9.25+A1*0.25;100)*COUNT(A1)

In A2, enter the formula
=A1 + (9.5-A1)
then in the cell just below it (A3), enter
=A2+0.25
Assuming A1 is the top left. Copy the formula in A3, select the next 399 cells and paste. Then select A2 - A364 and copy. Then select B2 -xx364 and paste. xx is the last column with data. If you want, set the height of your first column to 0 to hide it.

=(A1-1)*0.25+9.5 where A1 contains any number you want

Related

Subtotals in a column based on ranges in another column

Consider a table like the following:
WEEKNUM HOURS WEEKTOTAL
==============================
1 2
1 4 6
2 3
2 5
2 1 9
3 6 6
... ... ...
I am searching for a formula to use in the WEEKTOTAL column that sums those entries in the HOURS column that share the same weeknumber. I would like the actual subtotal entry to be added in the row that contains the last occurrence of each weeknumber (the entries are likely sorted by weeknumber). The other cells in this column can be empty.
I'm hoping this is possible using an ARRAYFORMULA, but I am not sure how to.
Thank you in advance!
Assuming "WEEKTOTAL" cell is C1.
in C2 :
=IF(A2<>A3,SUM(OFFSET(B2,0,0,-1*COUNTIF(A:A,A2))),"")
and drag downwards.
Idea : use countif() to 'drive' offset() range. Which in turn will be the range for sum(). All only happens if the next column a value is different (IF(A2<>A3, .. ) ).
Pls share if it works/not/understandable.

Excel Arrange multiple Columns

I have a data like this in excel:
1 1
1 2
2 2
3 2
And I want the result to be displayed like this:
1
1
1
2
2
2
2
3
Its like a ascending sorting. If the number in columnA <= columnB, it will be display first, at the same time, columnB will have a empty cell or blank value.
I have looked for this for a while but no one has the problem like this.
I would prefer a formula rather than VBA code.
Please advise, thanks!
Edit: I hope this explanation will be easier to understand
Data (A1:B2) - Result (C1:D4). Each number in Data (A1:B2) is a result of complicated formula so I cannot change its position
A B C D
1 1 2 1
2 3 4 2
3 3
4 4
Honestly, if you want to avoid VBA, here's a manual process that would give you the results you want:
Color each column (ie. Column A Red and Column B Blue)
Place values of column B under column A
Sort & Filter by Sort Smallest to Largest
Copy the contents of column A to column B
Last for Column A Find and Replace all* with format Blue then do the same for column B only with format Red. (See below for more info on how to do that).
Following those steps isn't the most conventional, but it will give you the results you wanted without VBA.
*Find and Replace based on font color:
1. Press Ctrl-H
2. Click Options
3. Click Format > Font > then select your font color > OK
4. With the Find What blank with the font color and the Replace With blank click Replace All.

how to expand list into pattern in Excel?

I have a list like this:
1
2
3
4
5
I am pulling those numbers into another spreadsheet, using vlookup.
I want to create a new list or pattern, that looks like this:
1
1
1
1
1
2
2
2
2
2
3
3
3
3
3
.. etc
How can I do that easily (my first list has 300 items, so dont want to do by hand)
Thanks!
Following the Scheme:
use the formulas:
C2 -> =A2
C3 -> =INDEX(A:A;ROUNDDOWN((ROW(G1)/$B$2)+2;0)) ' And Autocomplete
D2 -> =IF((ROUNDUP(ROW(G1)/($B$2+$B$4);0))-(ROUNDDOWN((ROW(G1)/($B$2+$B$4))+($B$4)/$B$2-$B$4/10;0))=1;INDEX(A:A;ROUNDDOWN((ROW(G1)/($B$2+$B$4))+2;0));"") ' And Autocomplete
The C column it's relevant to repeat without blanks, the column D it's relevant to the repeat with blanks.
In the cells B2 put the number of repetition and in the cell B4 put the blanks cells.
If you have more that one column to copy use the same code for every column...
If you need to have only values, at the end copy and paste with value ...
Warning: The formula in column D work with low number of blanks and Repeat... Eventually you need to recalibrate.

Excel: creating a number coloumn based on ID

I am trying to achieve this on excel but I don't know how I can do this. Can someone help?
ID Number
123001 1
123001 2
155001 1
155001 2
155001 3
156003 1
147009 1
147009 2
Assuming ID occupies cell A1, you can use this formula
=IF(A2=A1,B1+1,1)
in cell B2 and copy this formula downwards. I'm assuming that the repeated IDs are grouped in the same block.

How to count number of matches between two columns in Excel?

How to count number of matches between two columns in Excel?
For example if we have:
1 1
2 1
3 2
4 4
5 3
I need to get either a column like this:
1
0
0
1
0
and then I can sum the ones in there to get the count of matches.
Option 1: IF
=IF(A1=B1;1;0)
This formula will put 1 in the cell if A1 = B1, and 0 otherwise.
Option 2: COUNTIF
Write =A1=B1 in C1, etc., in the column cells. This will fill the C column with TRUE and FALSE values.
At the bottom of that column, add a cell =COUNTIF(C1:C100;TRUE) so that you count the cells between C1 and C100 which have value TRUE.
You may find the TechRepublic article Use COUNTIFS() to compare two data sets in Excel of use. See also Microsoft's documentation on countifs().

Resources