Custom sort in excel , by each account name and then by cost - excel

I have an excel like
I want to sort the value by the Second column but
I want to retain the "yellow" colored rows containing total values as well after each sorting group, so the expected output will be BARBIE MEDICO first then the total sum of BARBIE, then RAJESH ..
When I tried Sort Box with Name and Then BY, all cost ( yellow) rows are coming on the top
Another example

Related

PowerBI Matrix- Compare cells from two or more rows and highlight if the values differ

I need to compare values in the column in three rows within a group and highlight the group is atleast one value is different. For example:
Code Row Amount
_A
________1 100.13
________2 100.13
________3 100.24
_B
________1 200.00
________2 200.00
________3 200.00
In the above example I want to highlight all rows under "A" as the third record has a different amount than the other two. The group for B will should not be highlighted as all three amounts are same. Can this be done in PowerBI using the Matrix viz.

sorting in Excel with Rank Function in Group

hi, I would like to discuss on how to get sorting ascending formula from this case. Expected result is as shown in the picture in blue column. The only reference that can be used is Rank column (Yellow) and Group column (white).
Any idea how to get the rank unique expected column (blue)? the flow is go through in the group, find the min number in the rank within the group and put into the reverse order.
Assuming Group is in A1, series fill ColumnC from 1 to 10 then sort that column from where the second Group starts (C4:C10) by A A to Z and B Smallest to Largest.

Fill in table based a column of categories in Excel

I have a table that looks like this:
Type Value
Movie 5
Food 3
Gas 10
Food 2
.... ....
And There's a second table I want to fill in with "Value" based on their type in the first table, so that the corresponding rows look like this:
Rent Food Movie Gas Clothing ... ( appear in specific order bc they are subcategories)
5
3
10
2
The title row is already there, so I was thinking there might be some kind of lookup method to do this? How do I do that?
your second table apperas to hold one value per row but it doesn't have a label. it does correlate to the original row number, is this by design or coincidence?
if this is by design then you can use those 2 columns, hide them if you like, get a unique list of categories by copying you r abels to a new colum, removing duplicates in the data tab, then paste special transpose in c1 to create colum headers.
so column a and b remain unchanged
row 1 contains header starting at column c
your data starts at c2
this is the formula
=Iferror(vlookup(C$1,$A2:$B2,2,false),"")
drag it down and to the right
you can copy paste special values when done to remove the formulas
for something with only a hundred or thousand cells this will be one of the easier options but i would not do this on large tables, for those i would use power query or VBA
Assuming your 1st table is in Sheet1 and 2nd table is in sheet2.. you may try to fill in Sheet2!A2
=IF(Sheet1!$A2=A$1,Sheet1!$B2,"")
and drag it all the way.. Hope you get how it works.. and what you need.

Irregular Range Average Based on Common Value in ID

I'm trying to average groups of numbers which share a common value in one column but do not have a consistent number of rows. Simplified example of the problem below:
ID Value
Cat 2
Cat 3
Cat 5
Cat 8
Dog 1
Dog 6
Dog 3
Fish 3
Fish 9
So I'd like to find a single average of the values for each of the groups Cat, Dog, and Fish.
Note: I have just over 13,000 rows and 596 unique IDs shared amongst those 13,000 data (all positive decimals).
Select your data.
Go to Insert, Pivot Table
Select a destination for the Pivot Table
Drag the fields from the field list such that ID is a Row Label and Value is in the Values section:
Click on the downward arrow beside the Value field and click on Value field Settings.
Change the Summarise operation to Average.

Sumproduct using 2 criterias and on filtered values

I have the following source table
Date | fruit | veg
The user has previously filtered the date by month. In another table, I want to count the number of apples and tomatoes for example. To remove the invisible rows I use the SUBTOTAL function as
=(SUBTOTAL(102;OFFSET(limiter;ROW(limiter)-MIN(ROW(limiter));;1;1)))
where 'limiter' is the date range.
Then to count the number of apples in the fruit column , I use
= SUMPRODUCT(SUBTOTAL(102;OFFSET(limiter;ROW(limiter)-MIN(ROW(limiter));;1;1)) * Table!fruit = "apple"
and it works fine.
But, if I want to add in the vegetables criteria along with the fruit, the result is 0. I tried doing the sumproduct of fruit and veg first and then add the subtotal function but it gave a huge number.
Have you considered using a pivot table? (I strongly recommend you to)
Go to a new tab, select A1 and insert, new pivot table. You can put the fruit field in the column (probably row labels - my excel is in Portuguese =/). You would instantly have a table containing as first colum the list of existing fruits.
Then add the date to the body (probably values) of the pivot table and certify the type of value shown is count.
You would intantly get the count of all fruits.
The great advantage is that you can play around with this table as easily as dragging and dropping fields in columns, rows and body/values and instantly getting the results you want without having to figure out any formula issues.
Pivot tables also allow you to filter not only the date, but any other fields you wish.

Resources