Linking Combo Boxes from different Worksheet in an Excel Workbook - excel

I have a workbook with Combo Boxes on each Worksheet that are linked to the same data range. To help prevent bad data entry I would like to link Combo Boxes with the Same Data. For example each worksheet has a Country combo box. When the Country is selected on Sheet1 I want it to set the Country selection on all subsequent worksheets with a Country combo box.
I'm working with Excel 2007.
Any suggestions or assistance would be greatly appreciated. I can get them to update with the selected field but they lose all the other data ie: the other options pulled in from the range of Countries.
Cheers.

When your question is how can I select a country from a combobox in sheet1 and use the same value in all the other sheets in the same workbook, the answer is to reference the cells in the other sheets to the cell in sheet1 where the selection was made. In other words remove the country selection comboboxes from all sheets EXCEPT the first one and let the selected country on the first sheet drive the data on the other sheets (e.g. sheet1$A$1 or even better use a defined name!).
Alternatively, you could create a VBA script (on_change) for every sheet which is executed when the country code cell is changed on that sheet. The script reads the latest selected country, then puts the selected country value in e.g. sheet1$A$1. You would still reference all other sheets from this single controlling cell ($A$1) though.

Related

Use common dropdown across multiple worksheets to change single cell

I have a large file with a Scenario Manager, where changing a single cell on the Summary worksheet changes the visible scenario throughout the rest of the workbook. Data Tables are working a treat providing the headline values for each option.
I'd like to have a drop down on each sheet that when changed will change the same single cell on the Summary worksheet, so I don't need to go back to the Summary sheet every time I want to switch visible scenarios.
This is a simple process if I'm using macros and would be the solution I'd normally jump straight to. But this needs to be done without macros and this is where I'm now struggling.
Does anyone know if this is possible (without macros) and point me in the right direction?
Josh
You can insert combo box (Developer Tab > Insert > Form Controls > Combo Box) on each sheet. Mention linked cell as a cell of the summary sheet (Absolute reference with sheet name). That cell will give you index of the item selected in the drop down list. Then you can insert index formula in the cell you want to change every time to get value of the drop down list. Once you insert it on one sheet you can copy it to other sheets. No macros required.

Hyperlink to a worksheet that then filters accordingly

how I can hyperlink a word to another worksheet that then is filtered to show just the section that applies to the word.
I have attached an example of States.
On sheet-1 there are a list of States(e.g Karnataka) that I would like to hyperlink to sheet-2 but once I get to sheet 2, I would like it to only show the relevant data, e.g only the rows which show Karnataka.]
Please help me on this
Thanks in advance.
VBA - use activecell.value to define a variable. Run a macro from the hyperlink that takes you to the sheet and applies the filter based on the value of that cell (macro can be the same for all cells as the variable they forms the criteria will be based on the cells contents)

Getting data from other sheets with dropdown menu

I want to get the datas from other sheets to the main sheet by selecting the store name from the dropdown menu on main sheet.
So on main sheet, i want people to select the store name from dropdown list and retrieve the product stock datas (all sheets have same product names) and allow them to change the stock values and store them to corresponding store sheets that i will hide.
Here is an example sheet i prepared:
https://docs.google.com/spreadsheets/d/1BtrNKMSgurdft01P9Dw5MEh7rmYWPapwE18yhvDCdYE/edit?usp=sharing
Waiting for your help.
Thanks
You can probably achieve the first part with the INDIRECT function, which lets you convert a String into a Cell Reference or Named Range.
As an example, if you have Worksheets called Sheet1 and Other Sheet, and a dropdown with those names in cell $A$1 of another sheet, then you can retrieve the value from cell $B$2 of those sheets like so:
=INDIRECT("'" & $A$1 & "'!$B$2")
Which will evaluate to one of the following:
=INDIRECT("'Sheet1'!$B$2") > =Sheet1!$B$2
or
=INDIRECT("'Other Sheet!$B$2") > ='Other Sheet'!$B$2
This will not, however, let you send the data back to that sheet without delving into VBA. If you don't want to do that, you might be better off changing your drop-down to a series of Hyperlinks along the top of your worksheets to go directly to the sheets?

Show multiple drillthrough tables in a single Excel sheet

I need to create a report (for printing) that has two sections. The top section contains the scorecard, and the bottom section contains the drillthrough information for any "red" items in the scorecard.
The scorecard is currently a PowerPivot table with conditional formatting. If the scorecard has 3 "red" cells, then I can double-click on each of the red cells to drillthrough to the details. However, I would like to display those 3 drillthrough tables in the same worksheet below the scorecard, so I can print both the scorecard and the drillthrough details all at once.
I'm looking for a solution that is automated. Each time I print out the report, I can do a lot of copy and paste, but I rather not. I'm looking for a solution that is as automated as possible - so the bottom section of the report will always contain details for anything that is red in the scorecard. I'm open to using VBA.
Thanks!
I would suggest to use VBA. However first store a list of sheets in one of your sheets for your VBA code to use. Create the following subroutine in your Workbook code section to have the trigger for when a new sheet is selected:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Now add code to this subroutine to verify if the sheet selected was already present in your workbook by checking against the list.
If it wasn't in the list yet, check if there is a table on the sheet.
If there is a table on the sheet have its content copied/moved to your report sheet to a specific range and delete the drill through sheet again (and remove it from the list). Have the code select your report sheet again!
If there was NO table on the sheet add it to the list of sheets

Excel VBA Workbook_open event handler required

I have reference data in columns A and B on Sheet2 of my WorkBook. I have a blank sheet - Sheet1 - which i need to fill from my database.
I want to use Excel VBA to fill Sheet1 based on data in columns A and B in Sheet2.
I use the reference data by.
I populate values in column A in Sheet1 from DB.
I check if the values stored in sheet 1, column A exist in Sheet2 column A,
If so, I populate into sheet 1 column B, the corresponding data i've found in Sheet2 column B.
Open excel, do alt + F11 that will open the IDE.
In the right hand window should see vba project and in brackets the name of the excel book you have open.
At the bottom of the list of sheets is an object called ThisWorkbook, right click it, and select View Code.
At top of should see two combo boxes, right hand one should say General click on it and select Workbook from the list.
This should give you the following
Private Sub Workbook_Open()
End Sub
This is the event that is fired each time the work book is opened. Now you will need to add code to reference the sheets in the workbook.
Here is some methods for how to reference sheets in vba Reference sheets. Next step will be to refer to the cells in the sheets see - > excel ranges as an example.

Resources