How to group the rows in excel using macros - excel

This is what i need
i want to group the rows of above screen shot to below screen shot
Tried a lot using macro but not getting proper any one please help me out
Thanks in advance.

The simplest way to do this is with a pivot table. With a cell in your table selected, choose Pivot Table from the Insert tab. of the ribbon. Use the settings I show in this image. You can customize the pivot table to remove the Grand Total line.

Related

Power BI show/hide slicer based on another slicer value selection

Following the article, I was able to show/hide line charts through applying card measure over line/bar charts visual. It is also required for the project to show/hide other slicers based on primary slicer value. please see attached image
The interaction with slicer's Dropdown icon is not possible once applying card measure over the secondary slicers. Is there any way through DAX or other workaround to send the transparent card back to original visual (slicer in this case) for interaction? Thanks so much.
Just to update if you face similar issue, this issue has been resolved through using buttons (instead of slicer) for the Interval values. Then used bookmarks and selection pane to show/hide other slicers/visuals. I found this way much easier and interactive. Thanks.

How to filter out multiple values assigned to a specific name in my filer column?

I need to create an Excel template with f.e following columns and data:
Example of an Excel Table
and so on. So my goal is to set up the filter in such a way, that when I choose A1 from A column, I can get all the related B,C and D values, like B1,C1,D1; B1.1,C1.1,D1.1;B1.2,C1.2,D1.2
With the normal filter I can only see B1,C1,D1 when I choose A1.
The only solution I came up with, is writing A1 in every row that has relevant B 1.x ,C 1.x and D 1,x. Then I can see all relevant stuff, but this solution is not the most effective one(especially when values inserted will be a small text, writing same sentences in each row makes it look a bit messy)
The Pivot Table also does not recognize B1.1 C1.1,D1.1; B1.2 C1.2,D1.2 as related to A1. Even when I copied A1 in every row, it still couldn't sort it correctly.
Can you please help me with these quesitons? Many thanks in advance!
Kamola.
Update: I created a following example for clarification, hope it will help a bit! Unfortunately I cannot share the Excel Sheet per Stack Overflow, so here is a screenshot of it:Example of the content
MANUAL APPROACH
In your example which is a Table but not a pivot table,
Highlight Column Problems in your table;
Press Ctrl+G on your keyboard to bring out the Go To window;
Click Special... button at the left corner of the window;
Select Blanks then click OK;
Do not alter anything, go to the formula bar and enter =A2, then hold Ctrl key and press Enter.
If you have done the above steps correctly, you should have column A filled with Problem IDs.
POWER QUERY APPROACH
FYI, if you are using Excel 2010 Professional Plus or later versions of Excel, you can add your data table to Power Query Editor, right click the column header of the first column and select Fill -> Down to quickly fill the column with all Problem ID.
PIVOT TABLE APPROACH
If you want to show row labels in each line in a pivot table (as mentioned in your post), click somewhere within the pivot table, go to Design tab in the Excel ribbon, click Report Layout and select Repeat All Item Labels.
Let me know if you have any questions. Cheers :)

Excel pivot table formatting keeps changing

Suppose I have a pivot table:
Now if I add a column in it turns into this:
Clearly the formatting has messed up on the lighter blue cells at the top. I wish these to be the same dark blue as the original.
Even worse it does this when even just the values of the raw data behind the pivot changes, let alone adding columns etc.
Is there a fix for this to lock the formatting as I am having to update many such pivots and changing the colour each time I make a single change on the raw data or want to add a new column on every pivot is getting tedious.
I have looked online and looked into preserve cell width + formatting option bt messing with those has not helped.
Any ideas?
PS: Can anyone embed the images for me?
If you want to preserve the formatting, you need to add a new pivot table style. Within a pivot table, choose Design on the ribbon. You'll see swatches of the existing pivot table styles. Choose the down arrow and "New Pivot Table Style."
This dialog box will appear.
From here, you could specify the header, total row, and row styles you'd want. Once applied to a pivot table, new columns won't affect the style.

Using conditional formatting on Excel slicers

I have intermediate excel skills and am relatively new to pivot charts and slicers. I have made a pivot chart out of production-related data. Next to the chart is a slicer that displays all the different products in production. Basically, whenever the user clicks on one of the products in the slicer, it displays a bar graph mixed with a line graph. If the bars are exceeding the line, then the product is considered "critical" (it is exceeding production capacity). I want to use conditional formatting (or another method, preferably not a macro) to highlight the products on the slicer in red that are critical.
Thanks in advance for your help.
You can't conditionally format Slicer Items. Instead, your best bet is to use a second PivotTable that only shows the critical products in it.

How to add sort buttons to an excel spreadsheet?

I have a spread sheet with 6 columns (A-F)
A- WO#
B- Priority
C- Equipment #
D- Description
E- Brief Description of Problem
F- Shutdown WO Y/N
I want to be able to install a button that will sort the data by priority and one to sort the data by WO#. What would be the macro that I would need to do this? There will be no more columns added but the amount of rows of data will always be changing. Ive tried to make my own but cant get it to work when I start to add more rows of data.
Any help is appreciated.
Thank You
Highlight the columns, go to Data tab, click Filter, then in the column drop-down menu, you can choose sort.
Are you trying to create your own sort button or simply trying to sort data in a specific order?
Here's instructions for the latter:
1.Select the cell range you want to sort.
2.Select the Data tab on the Ribbon, then click the Sort command.
3.The Sort dialog box will appear.
4.Decide the sorting order (either ascending or descending).
5.Once you're satisfied with your selection, click OK.
6.The cell range will be sorted by the selected column.

Resources