I have been attempting to cobble together code from different forums for the past several hours to make a macro to unhide a specific number of worksheets based on a cell value, and have failed miserably thus far. Here are the specifics of what I have going on:
Microsoft Excel 2010 Workbook Name: TASERR Model - 06-26-13.xlsm
In this workbook, I have a worksheet called "Input". In cell C21 of that worksheet, workbook users will fill in a number between 1 and 50 (I have the value for that cell limited to those numbers through data validation). Based on the value in that cell (C21), I want to make a macro to unhide that specific number of hidden worksheets. I have 50 hidden worksheets which are named "Route (1)", "Route (2)", "Route (3)", etc.. If the value in cell C21 is 7, I want the worksheets named "Route (1)", "Route (2)", "Route (3)", "Route (4)", "Route (5)", "Route (6)", and "Route (7)" to unhide. If the value in cell C21 is 3, I want the worksheets named "Route (1)", "Route (2)", and "Route (3)" to unhide. I'm sure y'all can see the functionality I'm going for at this point.
I'm building a spreadsheet which has a formula which performs a vlookup on a sheet. Now I want to leave the vlookup formula so that you don't need to change it. What I want to achieve is that the vlookup table array references a cell in the current worksheet which is a name of another worksheet.
What this will enable me to do is to keep the forumla unchanged by by changing the cell with the worksheet name in it points the vlookup to a different sheet. This is because I have multiple sheets which have similar data on and I don;t want to edit the forumla to point to the different sheets.
My Workbook has 72 worksheets split into two. The first 36 include all the data, but the second 36 have one element removed.
I am very grateful to RoyUK and others who have steered me towards some code that allows me to hide and unhide the first 36 sheets exactly as I want, but when I add the second 36 the code comes up with an error saying the Procedure is too large.
I did want to split the code into two parts activated by two validated drop down menus, but this did not work either.
If I have two drop down menus at D8 and G8 is it possible to have two separate codes as follows
I'm trying to match certain transactions between two bank accounts, where the only like values are going to be date and disbursement/deposit amount. Obviously vlookup will not work here because there are many duplicate values. In the attachment I put in a Vlookup in the Account 2 tab to try and demonstrate what I'm trying to do exactly, which is match deposits in Account 2 with Disbursements in Account 1.
After looking around I found that maybe a combination of INDEX/MATCH would work here but how to get it to work or even if it is appropriate in this situation.
I have 1000 diff names in a spread sheet and wish to search another spread sheet with these names on and alot more.
I want the search to look in the larger spread sheet for these 1000 names and copy all the informtaion in the cells to a new sheet, if the name is not found i would like something like "no info found" to be seen.
Im a novice to doing this sort of thing in excel, but i have found this script which searches for the word "mail box" and copies all the info in the cell when it finds it.
Using a Month specified in an input box eg: July Payday
Look up that month on the "info" worksheet to then copy and paste all the dates for that month on to a worksheet called "Working Hours". This is the code I have at the moment...not much I know, I don't know how to format the code in to tags:
Sub WorkingDays() Dim LastRow As Long Dim Month As String 'setting the object of Month being the data we need to find Month = InputBox("Please enter the month you wish to record, eg July Payday") 'Typing the Month which we need to copy the dates for
I have two lists. One is a database (Worksheet 2) with a lot of information, and another is the list (worksheet 1) I need to fill up the data for. What I want to do is to search for the names that are in worksheet 1 in worksheet 2, and if there is a match, retrieve the missing data in those rows, and paste it back into worksheet 1. For example: Worksheet 1: Joe Tim 23 Matt
Worksheet 2: Alex 45 Joe 23 Mark 47 Tim 44 Matt 24
I basically want it to be able to search for the corresponding name, and then pull the number associated with it.
some of the code proved inflexible when applied to other columns of data. I have some VBA code that could work if it can be modified. First the code:
Sub ColorMe() Dim lRw As Long lRw = Range("B" & Rows.Count).End(xlUp).Row
The way things are right now, if a cell in the B-column contains the word "April" (and ONLY that word), the contents of the C-column's cell on the same row receives a red font color (index 3 as per the example above). The idea is to modify the code so that it searches for the word "April" in a string of text such as "Mike's April Trip" and color the contents of the cell to the right of it accordingly. Is this possible?
As an aside, conditional formatting does not work for the purpose that the cells are being colored for. It needs to remain hard-coded like in the script above, hence why I am just looking to modify something that 'sort-of' works.
The easiest way of explaining what I'm after is to say, I have letters of the alphabet, in their own cells, and I want to find them by way of a search. I don't mind how this is done, but it would be good if for example you entered A, C and E, any cells containing those letters changed, maybe became bold, or the cell filled with colour.
I have multiple worksheets with part numbers and prices for different computer parts. On each worksheet I have multiple sets of part numbers and prices but I only need one the information from specific part from each worksheet. Luckily, the part number I need is also the name of whatever worksheet contains it. I want to take the part numbers and prices from the parts I need and put them in one master sheet called "PartsNumbersCombined". Currently I haven't even attempted to format the data in PartsNumbersCombined, I am just trying to actually pick up and move the correct data. Here is my code:
Sub harvest() ShtCount = ActiveWorkbook.Sheets.Count For i = 2 To ShtCount
The part numbers are in column A and the prices are one row down in column C. I feel like I am close but I can not get anything pasted on my master sheet.
I want to write a macro that will copy data from all worksheets of a specified workbook and copy them into a new workbook.
To give some detail, I receive a report each morning containing failed deliveries. I also export a list of failed deliveries from a system (SAP). These reports rarely match so I must compare the two daily. I do this using INDEX and MATCH functions but now my boss wants all the data in a single report so I would like to harness the might of vba to consolodate all the data in one workbook.
The lists of failed deliveries are contained in worksheets marked mon, tue, wed... so I need to search all worksheets for all delivery numbers and copy all of the data into a new book. This becomes complicated because on Monday there is only one tab marked mon, on tuesday there are two (mon & tue), one wednesday there are three and so on.
I have started on some code but I am getting nowhere fast. I have managed to muster an input box which asks for a date (this will be used to search the file path for a file named "failed deliveries & "mm/mm/yyy")
I have been searching the boards long and hard for this solution and have yet to find that applies fully. Every day I need to search through 20 worksheets for transactions occurring on a specific date and copy the row onto a new worksheet. I would like to run a macro that would allow me to search for a specific transaction date in column C of each worksheet and if the date matches it will copy the entire row to a new worksheet.
The issue I am having is that the transaction lists are a running sum of all the transactions for each account. Therefore, the range that the macro needs to search will change daily as well. Furthermore, the date that I would be searching for could potentially appear in column A or B but I only want the row if the date matches that of column C. Also, on some sheets there may not be a transaction at all.
I am working on a project that I feel should be relatively simple but I seem to be stuck. My Goal: To add information to specific rows of data in the worksheet. I want to use a user form, and eliminate as much typing for the user as possible. I have already designed my user form, and written the code to identify the row in which I want to edit. Nonetheless, I do not know how to code the insertion of the new data. The data I want to add will be in empty cells at the end(right) of the data table.
I have attached a portion of my data set.InsertQuote.jpg
Here is where I am. The words in red are just colloquial words that I cannot seem to put into code.
Private Sub CmdInsert_Click() Dim Company As String Dim PartNumber As Variant Dim Condition As String
I am trying to write a macro to open a specific file, but need to search multiple folders within folders to find it.
The file name I need to open is "Escalation Adherence-Details " & Format(Date, "mm-dd-yy") & ".xlsx".
I need to drill down to the Adherence Report folder and then have the macro search through folders for each year (2012, 2013, 2014, 2015, etc) and then each month within each year (1 January, 2 February, 3 March, etc), at which point I would then find that day's file.
So far I have the following:
Code: Sub Open_ESCL_Report()
Workbooks.Open Filename:=*****.****.****.******.comsharesPurchasingTeam XEscalationAdherence Report & "Escalation Adherence-Details " & Format(Date, "mm-dd-yy") & ".xlsx" End Sub
Each file is stored in it's respective month folder as .....Adherence Report(Year)(Month)(File).xlsx
I would like to select all cells in column A that begin with the text "SP". Some cells will be contiguous but others will not. For instance in one case, I would like the macro to select cells with the text "SP" which would result in cells A1, A2, A3, A10, A15 being selected. I am working on building a macro that will then do other things to these cells/rows so this is the first step.
The below code will select the first cell with "SP". How would I alter this code to only search Column A and select multiple cells? or totally different code.
Code: Sub test() Dim r As RangeSet r = Cells.Find(what:="SP", LookIn:=xlValues, lookat:=xlWhole) If Not r Is Nothing Then r.Select End Sub
on one sheet we have a summary of the main list, which includes totals of money recieved, totals of all the different sources (ie, where they heard about us from), the totals of the frequencies they pay (ie, how many donate monthly, quarterly...) ... etc. on the next sheet we have the "main" list of donors, their IDs, amounts, frequency, source ...
the totals on the first sheet are updated manually, but i want to change that as there are a great number of errors.
I have the following code that lists all the worksheets in workbook. I would like to have this list show only the worksheets that end in "SD". (For example, it would show "MainSD" or "CantonSD" but not "Main".)
I would like to use VBA to combine specific sheets. I have a workbook containing about 15 sheets but want to combine 6 specific sheets. All the sheets have the exact same headers and number of columns but the number of rows are different.
I found this VBA code that works but it combines ALL of the sheets in the workbook. How to modify this to combine specific sheets. How to combine all visible sheets if that's possible.
Here is the code I found...
Sub CopyFromWorksheets() Dim wrk As Workbook 'Workbook object - Always good to work with object variables Dim sht As Worksheet 'Object for handling worksheets in loop Dim trg As Worksheet 'Master Worksheet Dim rng As Range 'Range object
I have two worksheets. On one worksheet under column G I have hundreds of random numbers, but I only want to extract a specific half. In the second worksheet I have two columns A and B. Column A has the exact numbers that I want to extract from Column G. I would like to get the numbers from Sheet 1 under column G listed under Sheet 2 Column B in reference to Column A.
I have a spreadsheet of several sheets, but 7 of them (Red, Orange, Yellow, Green, Blue, Purple, Black) are the guts of the file and where I make adjustments. The layout of these sheets is the same, there are several cells of data on each sheet that coordinate with data in the same cell on other sheets. The problem is the sheets are so big, when I change sheets I have to go find the data that was in the same cell (or close) to where I just was on a previous sheet. So for example if on “Red” I am in cell AX253 and I go to sheet “Yellow” I would like it if AX253 would be selected when I get there. And if I select a different cell like D56 on Yellow and pick Green then I want D56 to be automatically selected on Green.
In addition, I plan to use a check box on an eighth sheet called “White” to turn the feature on and off. I have never written code for a check box before.
Is this to terribly difficult to do? I did some searching and saw some code that was similar to this but could not get it to work.
I am seeking the most efficient code to print all excel worksheets beginning with sheet "XYZ" and ending with the last sheet in the workbook.
- Sheet "XYZ" is always the starting point - The number of sheets after "XYZ" is variable - The names of the subsequent sheets are unique and not sequentially named/numbered - The printing will be to one report (i.e. don't print pages individually)