I have got a sheet of a customer with a Dropdown List.
By selecting an Item of the DD some magic happens:
a part of the sheet is filled with values and is color-formatted as a table.
But I cannot identify any VBA macro or any formula behind the DD-List action.
What magic automatism is going on here?
What I believe is happening is that they included some Conditional Formatting in the table. When you change the selection on the drop down list, there may be an INDEX statement that pulls the records for that newly selected drop down.
I would suggest checking by clicking Conditional Formatting in the ribbon and seeing if there any rules under Manage Rules.
Related
I am an intern with limited VBA experience so please excuse any naivety.
There are two drop down list options (SHOWN IN THE ATTACHED LINK), the drop down list for state is permanently displayed regardless of the cell selected and is formatted in a way that makes it clear that their are options while the country drop down only appears when the cell itself is selected and an objective user would not know there is a list/choice. How do I replicate the state cell for the country cell. Is there a way to find what vba code was used for the state cell?
DROP-DOWN LIST IMAGE
I have a table of overdue customer invoices. Each customer could have several overdue invoices and I want to collate these into separate customer tables, with a sum total of due amount.
I want this to be in one worksheet, with the header row above each customer table.
Therefore, I'm looking for a VBA macro that will go through the data in column A and when it sees a change, from one customer number to the next, it totals up the values for that customer and inserts the header row, ready for the next customer. And continues on...
Example sheet Here
Sheet(tab)1 shows raw data, sheet2 shows how the formatted data should look.
I'm stumped sorry and any help or direction appreciated. Hope the info is clear.
To get started I suggest you search google "creating vba macros read and write column"
Are you familiar with VBA macro? If not, you could use a combination of index, and match formula.
Otherwise VBA solution logic, in VBA editor - which is accessible by Alt +F11:
Click on the sheet you want your VBA code to apply to and start writing your function. For example a function to check a cell range called "myFunction" would be as follows,
A single example:
Sub myFunction ()
If range.("A1").value = "Customer1" then
Range("B1:E1").Insert([Shift], [CopyOrigin])
end If
Sub End
More work required to check condition on event, dynamic insert, and will need to be wrapped in a loop. The below are tutorials specific to the job you need to program your macro for.
VBA copy and paste code if condition is met tutorial here : https://youtu.be/qGZQIl9JJk4
VBA insert tutorial here : https://powerspreadsheets.com/excel-vba-insert-row/#Excel-VBA-Constructs-to-Insert-Rows
VBA How to SUM Totals At Bottom of a Column Dynamically : https://youtu.be/_0Vcnb3xdOM
The first question is-- What VBA have you tried?
Next, change col A heading to Customer, and col E heading to Amount
because these are the desired output headings .
Next, did you know that by dropping down View, and then Macros,
that there is a RECORD button? Click it.
Finally, it records your pressing Insert / PivotTable on a New sheet.
Drag the Amount field down to the Values box
After you drag each of the other fields to the Rows box,
left click on it in the Rows box, and select FieldSettings --
Subtotals tab -- Automatic for Customer, None for the others
Layout tab -- Show item labels in tabular form for each field
and just for Customer field--Insert page break after each item
At the end, click on any cell of the pivot, select PivotTableOptions --
Totals&Filters tab -- unclick Column totals
Click PageLayout,
then Margins -- make them narrow
then Sheet -- Rows to print at the top
Maybe Header -- Custom Header
Finally click on View / Macro
StopRecording
Presto, now the VBA has been captured.
Ok, so all you have to do is insert a Subtotal. Check out these screen shots.
Before:
After:
Depending on which version of Excel you are using, would probably determine how to navigate to the Subtotal button. Google for that, if you can't fine it. Should be super-simple.
I have an Excel spreadsheet that I'm generating from a SharePoint dashboard. It's turning my checkboxes in the SharePoint table to "true" or "false" values in the Excel spreadsheet. I wanted to know if it is possible to turn those "true" or "false" values back into checked boxes, with the appropriate check or uncheck option selected.
Any help at all is appreciated!
I strongly advise against using check boxes in Excel if you already have the data as TRUE/FALSE in a cell. Check box controls are meant to be for user forms, and even though they can be placed in the spreadsheet grid, they live in a layer on top of the spreadsheet. Yes, they can be linked to a spreadsheet cell, but this is cumbersome.
Instead of using a macro that inserts a check box for each data row you could use a helper column with a formula along the lines of
=IF([#checkBoxField],"a","r")
Then format the helper column with the Marlett font, which will show the letter "a" as a tick and the letter "r" as a cross.
Applying a formula like this will be much faster than inserting check box controls into each row and linking them to the field cells.
You can add a checkbox over a given cell, then edit its properties (Format Control --> Control Tab) and set its Cell Link property to the address of the cell; i.e. "B2". If you have too many such boolean cells, the task is tedious so you might need to automate it with VBA.
p.s. I agree with #teylyn that this shouldn't be a good choice if you have a huge column of boolean data; it adds too many shapes which is cumbersome. You should use it if the number of boolean cells is rather limited.
I am creating a work planner using Excel. The user selects a specific name from a drop down menu and it displays the projects. I want a table/gridline to be displayed. I would like it to add a gridline which automatically shows/hides when a name is selected but the height should be dependent on the rows of data. So if there are a 5 projects the table should be 5 columns long.
I have implemented a formula using Conditional Formatting (=NOT(ISBLANK(D6))), but the table still shows if I select the default option which shows no names.
Bit tricky without knowing what's in D6! - but presume it's your dropdown... in which case don't you want this an absolute reference $D$6?
One other thing to try is having multiple rules, so setup conditional formatting so that ISBLANK(D6) then no borders (make sure it's the first rule and to tick 'stop if true' to stop it running through to your NOT(ISBLANK) rule)
I'm using Office 2013, and working on a worksheet in Excel.
My question is, is there a way to create a dynamic filter in Excel?
To explain in more detail, I have a dynamic worksheet, where upon opening the user will get a few drop-down options. After the user has selected one option from each of the drop-downs, the worksheet will display a table of data based on the user's inputs. The user can change their selections from the drop-downs after the table has been displayed, and can also clear their selections. If they clear their selection, the table will disappear.
Now, the first column in the result Table will contain Text values, but can also contain blanks. These values or blanks are all decided based on the user's selections in the previously mentioned drop-downs, which are displayed permanently to the left of the table. I want to add a filter to this first column of the result table (and to the rest of the table with it) such that only the non blank cells are displayed in the table every time the drop-downs are changed.
As I understand your need correct, I can give you this solution:
For getting a better result make your range to Table.
Select Power View from Insert items;
A sheet Power View 1 will added to your workbook;
From right pane select Table1 and its fields;
From Filter pane select as you want for filtering.