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
I have an excel 2016 spreadsheet with about 1000 rows of data. Each row has a name like xxx_type1, or xxx_type2, or xxx_type3, etc. They also have further subdivisions, another column has a number (1,2,3,4, etc.) I would like to keep track of how many rows of each type the spreadsheet has and also how many are within each subdivision.
For example if the spreadsheet contains 100 rows of type1, I would like it to show on a separate sheet that I have 100 rows of type1 and 20 are in subdivision 1, 30 are in subdivision 2, 50 are in subdivision 3.
Does anybody have a macro that could do this or know a way I could make this happen?
I am thinking a pivot table might be the way to go, any suggestions?
Thank you!
Assuming you had your names in column A and subdivisions in column B, then the formula
=COUNTIFS($A:$A,"*_type2")
would determine how many "type2" records you had.
And the formula
=COUNTIFS($A:$A,"*_type1",$B:$B,2)
would determine how many "type1" records were in subdivision "2".
Below is an example layout / formulas that would summarise it for you:
Related
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.
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 have data Data to analyse
What I need is to
Analyse data in "SKU" ans "pieces" column from one worksheet
Type Similar "SKU" once in column 1 and add respective "pieces" in column 2 to another worksheet
Table shall look like as required after running macro
I have no idea from where to start.
You could do this …
… either with a formula
=SUMIF(A:A,A:A,B:B)
… or by adding a PivotTable
Therefore select the data SUK and Pieces and select from the ribbon menu Insert › PivotTable and check both fields (see image below).
I just can't understand why people never mention Excel's Subtotal feature, showing this result: :-)
In order to achieve this, go to the Data tab, and in the Outline part (the mostright one), you have the Subtotal feature, where you can use it.
By the way, I clicked on the 2 in the left margin, in order just to see those subtotals.
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.
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'm working on a budgeting spreadsheet that has a different replacement cycle for equipment and I want to visualize when everything will be scheduled to be replaced.
Column 1=name, Column 2=deployed, Column 3=expected life, Column 4=retire date, Column 5=price
I want to have another table next to it that shows the next several deploy dates (for the next 15 years) based on the expected life. Right now, I'm having to manually count over X number of cells and enter in the price and then count over again.... for each row.
I know there has to be a automated way to do this, but I'm new to excel macros and I've looked at several functions, but can't get anything figured out. What functions should I be looking at?
A formula like:
=IF((G$1-YEAR($B2))/$C2=ROUND((G$1-YEAR($B2))/$C2,0),$E2,"")
Should do the trick
(the above for column G, it is assumed the year is in G1)
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
https://www.dropbox.com/s/05f82d5piw0pfd2/Book1.xls
Hello everyone, can anyone show me how to deal with above ranking issue that I try to solve.
What I like to have is only ranking Names Occurrence when Month = February and Item = Item 1, also, ignore all item 2 with what even names and months between it.
Also, since I have more records, if possible could you please tell me how to apply ranking to whole columns.
Currently I try to use
=SUMPRODUCT(--(A:A=A2),--(C:C=C2),--(B:B=B2)--(D2=D:D))`
but looks like it doesn't work that way.
Add a helper column in column E (which can later be hidden) that screens out the rows you want to exclude:
=IF(AND(A2="Item 1",C2="February"),D2,"")
which would of course be copied down to the bottom of your data.
Then do the ranking in column F of the formula results in column E:
=IFERROR(RANK(E2,E:E),"")
again copied down to the end of the data.
The SUMPRODUCT might look something like this. I don't fully understand why you only rank 3 of those 18 items; this sumproduct ranks all 11 of the ITEM=1 MONTH=FEBRUARY rows [it also, separately, ranks the other rows, but you can just wrap this in an IF and suppress those].
=1+SUMPRODUCT(($A$2:$A$18=A2)*($C$2:$C$18=C2)*($D$2:$D$18>D2))
Reading that again, I guess you are really overcalculating the D column (that seems to be the number of C showing up). You could use COUNTIF to see if you are on the first row with that NAME, I think.