I am having trouble getting the selection of sheets to work. I have a workbook that has multiple sheets and one constant sheet (Summary). There is code to create new forms in this workbook and insert them after the Summary sheet. These forms all have a date input that is formatted as a date (mm/dd/yyyy), these dates get modified on the day the form is created, there may be any number of sheets created during this process. I have to print the summary sheet and only the newest forms created. I need a code to select sheets to print based on the date input of a user for each form. This is what I have so far:
VB: Dim i As Variant i = Range("B5").Value >= InputBox("What date to start PDF from? Format = mm/dd/yyyy") Sheets(Array("i")).Select [code]....
If the dim can be taken out and just included in the line for the array that would be fine with me. The cell "B5" is where the date is located in each form. I want to input a date and the macro will select the sheets where the date is equal to and greater than the date entered. The Summary sheet will always be included in the print set. I have a dialog box for setting which printer to use - this file will be used at different offices and therefor the printers will be different and it will also allow to create a PDF if desired.
I have a workbook that updates from external source and creates sheets depending on a cell range.
I have put tab 1 and tab 0 on either end of where the new sheets will be inputted, will never know how many sheets
What i need to happen is if someone fills in "complete" in A7 in my "summary" sheet then the values in row 6 in all the other sheets get hardcoded. This needs to happen from A7 down to A26, so A8 = complete then copy row 7 etc This is what i have so far
I get compile error here ........Sheets(ArrSh(1)).Activate
Also need it to work for all the other rows.
Sub hardcode() ' 'Sheets("Summary"). Select If Range("a7") = "complete" Then ' Sheets(Array("1", "0")).Select Sheets(ArrSh(1)).Activate
I'm not including my spreadsheet because it has company information however, I will try to articulate my request as best I can. I currently have an Excel spreadsheet with about 20 worksheets, I would like to be able to click on the first worksheet, create a "Drop Down box" or "Data Validation" box or whatever I need to do to be able to view information in a range of cells on ANOTHER worksheet within the same workbook.
I've tried Data Validation, Drop Down Boxes, Define name ranges, all to NO avail. I'm missing a step somewhere, because I'm still not able to view the information on the first worksheet.
I'm trying to select multiple sheets and print them out. At this time the code is only printing out the "Work Order" sheet. I'm guessing it's something to do with the PrintOut command trying to print the active sheet and not the array?
How can I select sheets in a workbook based on the premise that the sheetname does not have the letter "Q" in it? New to forum, so apologies if format is not kosher. I have a group of 50+ workbooks which are all set up in the following format:
-Contains 30+ sheets. -Sheet names are varied, but follow a pattern. I try to keep the sheet names consistant on all workbooks so that it is easier to reference, but other users make this impossible. -However, I managed to keep two things consistant: There are two categories of sheets. In one group all sheetnames have a "Q" in them and in the other group all sheetnames DON'T have a "Q" in them.
Here is my problem: I need to run a macro to perform retative tasks on the GROUP OF SHEETS WITHOUT A "Q". To begin the macro I need to select these sheets and copy them to a new workbook, but since the actual sheetnames are varied, I am having trouble coming up with a flexible way of selecting sheets. The closest I have come is using a IF ... LIKE ... THEN statement, but I can only get it to work to select the sheets with a "Q" in the name and not the opposite.
I would like a macro that select all cells based on multiple criteria. It's a big sheet, but I've made it smaller in the following example.
In row 1, there are 2 headers, in B1 (electricity) and C1 (gas) In column A, there are 3 houses, in A2, A6 and A10. The blocks of cells in between (e.g. B2:B5) have 2 headers, 'period' in B2, and 'account number' in B4. B3 and B5 have a list of options in them.
I want to select cells that meet certain criteria. Either electricity or gas, and either period or account number. So, if in cell D1 I choose electricity and in D2 period, I would like to select B3, B7 and B11. If I choose gas and account number, I wish to select C5, C9 and C13.
I have created a DAta Validation List and it only select one item. I want it to select as many items that is on the list but i can't get it to work for my main worksheet I am working on. I can't figure out why I can't get it to work for the work sheet "This Don't" but it works for the worksheet "This Works" why and how I can change it so both Reason (Column F and H can) select mutliple items on there. Data Sheet.xlsx
I have this workbook with 22 sheets and 21 are hidden. On the one open sheet there is a button that opens a userform with a listbox. I have radio buttons on the side to control whether the list box allows single selection, multiple selection, and extended selection. I want to change extended to open all sheets.
Anyway, I have the list box populated but I can't figure out how to code opening single sheets, multiple sheets, or all sheets depending on the radio button selected when the OK button is pressed. I know the listbox depends on the selected property but I am stuck. Here is the code I had but it is a mess. I am still new to VBA.
Private Sub OKButton_Click() Dim Msg As String Dim i As Integer Dim UserSheet As Object If ListBox1.ListIndex = -1 Then Msg = "Please select a sheet." Else Msg = "" For i = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(i) Then For Each i In ListBox1..........................
I watched a video on youtbe. And the women had three or four items in drop down box. She was using vba. When i emailed her to ask her how she did this, she kept telling me to go to her website and i was supose to figure it out on my own. I am trying to do a start up construction company. the link to her site is as follows Select Multiple Items from Excel Data Validation List - YouTube the idea of what i want to do, is how she clicks on a word and it follows in the coloumn to the right going down. This is what i need to know how to do. It is probably pretty elementary to many of you. But i build, i know how to read prints, to cut footprints for new homes etc. But when it comes to excel i am so green.
I'm trying to use a List Box to select multiple items on my Pivot Table but I can't seem to get it to work. Its the Report Filter part of the pivot table.
When the list Box is set to fmMultiSelectSingle it work and selects the indivdual items, but I need it set as fmMultiSelectMulti for if i'm also needed to select multiple items. (which doesn't seem to work!)
I have a validation list drop down box set up to reference data in a defined name list. I would like to be able to select multiple values from this list to appear in one cell (preferably separated by a comma). For example, the defined name list contains the following data:
Choice 1 Choice 2 Choice 3 Choice 4
I would like to be able to populate one cell with the following via the drop down list: Choice2, Choice 4
I have a spreadsheet where user can search for information inside a search box and the appropriate rows are returned using formulas.
I have a drop down list (Category: Model) in the search box as well as a search field (Category: Program, cell D2). Underneath the search box, search rows are returned with column categories: Program, Model, etc.
What I require is that if a user enters the specific program into the search field D2, then the dropdown list would automatically choose which model that program belongs to based on the returned row.
For example, if I typed "engine" into D2 and pressed enter,
Under the records section (Row 14 and beyond), the following record will pop up:
Program Model Indicators
Engine F-16 3a
Based on the record, F-16 would be chosen from the dropdown list. Is there any way this can be done?
I am trying to create a drop down list that when selected will display data in the 10 rows below and 4 columns, so a total of 40 cells. I would like the data to be based on the selection in the drop down list.
i have 27 different combinations of the above list with up to 10 different rows. I have a label for each one, but i cannot get the rows below my drop down list to display the proper values base don the selection in the drop down list.
a workbook containing 4 sheets, all sheets have the same format, only the number of rows and the content of the cells changes.
What I would like is a new worksheet with a macro, so that when i push the button update (or whatever) that all 4 existing worksheets are copied to the new one, without leaving blanks etc. and this even if you have previously added items to one of the 4 sheets. Is that possible.
The final goal is to have 1 huge list which is composed of the 4 sheets
I have a column where each cell contains the names of a variable number of worksheets in the format ["sheet1", "sheet2", etc. ] without the brackets but with the quotation marks. I would like to have some code that will select all of the sheets mentioned in a given cell. I found lots of threads about selecting an individual sheet based on a cell, but none about selecting multiple sheets. If it is easier, I can change the format of of the cells, or break each cell out into multiple cells in a given row. The best code I could come up with was
Sub Selects() Dim strSht As String Sheets("Criteria").Select strSht = ActiveSheet.Range("L31") Sheets( Array(strSht)).Select End Sub
I have data contained in matching cells from several sheets. I need a worksheet that reflect the summary of the data from the worksheets. No formula is required. I just want my summary worksheet to list the all the data from my other worksheets. I might end up having about a hundred worksheets that I need included in the summary. Attached is a sample. It would be better if the summary automaticaaly updates as new worksheets are added.
There are other dependent drop-down list posts on this forum, but none of them are talking about working with multiple worksheets. I have three worksheets, one called "Main", one called "Universities", one called "Schools".
One the "Main" worksheet, I have two Combo Boxes (the one from the "Form" toolbar). I would like to first pick a university from the combo box and then based on the selection, the second combo box would give me just the schools in that specific univeristy. My guess on how to link the two drop-down list is by the ID column. If I select "University of Washington" which has an ID of "WAS" it would narrow down the second list to ID with "WAS" in it (Which would be "WAS1", "WAS2, etc). The reason I am using Combo Box is because of the "Link Cell" property which give me an output of the number of the selection into a cell. I will use that to get the corresponding ID. I have attached an example to this post.
Each question is multiple choice (either A/B/C/D/E) and the values listed are the probability of each letter occurring. What formula would I need to put in the 'output' column for it in each row to output a letter based on the probabilities. E.g. in question 1, most of the time it would output E, but sometimes (rarely) A and very rarely B/C/D.
I have a huge db that has a column "C" with a list of names. I have been creating tabs and naming them according to that list. I wonder if there is anyway I can create and name the tabs automatically. I already searched for threads in the forum, but only found this this backwards "tabs to cells". By the way, the names in column "C" sometimes repeat.
The first part (code#) is a code for an item. The second number is the quantity of that item. What I need to do, is to be able to populate a master list which will pull the quantity of each item and sum them up. In the above case, the master list would look like this: