Macro To "go To" Specific Cell In A Different Sheet
Jan 14, 2009
I have a seriew of drop-down combon boxes that ultimately "drill-down" to a resulting sheet & cell reference in cell F7. Based on the criteria selected in these drop-downs the resulting sheet & cell reference (cell F7) will change. I am looking for help with a macro that, when run, will take me to the sheet & cell referenced in cell F7. When I do a goto function it always remember the last place I went to and never goes to the latest data in cell F7.
I have a protected template and unprotected source worksheets - - - what I would like to happen is for the macro to start and if the source worksheet cell B3 equals "Report Total" then stop - otherwise copy template worksheet then copy 6 specific cells from the source to paste values to specific cells on the newly created worksheet (B_ to C7, D_ to I7, E_ to C9, F_ to K9, A_ to C11, M_ to K11 and then K13=F13-30)
After that then start all over again unless the next row’s cell (B4, B5, B6, . . .) is "Report Total" then stop - - - the row count could be from one to a couple hundred.
Here is what I have so far but I know that with each copy the name will change and as it goes down the source file each row will change and I also need help with that.
I would like a macro that will go to a fixed sheet, copy the format, go back to the previous sheet and paste the format. My problems arise going back to the previously activated sheet rather than just a fixed sheet.
I'm trying to add some code so that it only runs on the specific sheet or a range of specific sheets - but this list might change in the future) as a worksheet event... When I have been doing this in the past, I have been copying the code to each of the individual sheets but this now seems to be incorrect.
This time, though, I have created the code on one sheet (with a Private Sub Worksheet_Calculate() event) which launches a macro in a separate module - my logic being to have as little code as possible in each of the sheets for copying, pasting, editing purposes, and centralise the main code in the module. However, I've noticed that this code is actually being run on all the sheets - even those I do not want it to run on. I thought, while developing this code, that it would only run on the one sheet it had been added to (e.g. right click the worksheet name, view code).
Writing a macro that when runned will show only two specific sheets in a work book. If i run macro 1 the sheet "xxx" and "start" should be the only visible sheets in the work book. If i run macro 2 after having runned macro 1 sheet "yyy" and "start" should be the only sheets appearing.
I have a workbook that has 2 similar worksheets. One called "Wood Shafts" and the other called "Iron Shafts" I have the macros worked out for the sheet called "Wood Shafts" and I just realised I need to apply similar Macros to the sheet called "Iron Shafts" (same functions but different values from different columns). Some how I need the code to be able to tell the difference between the two sheets. I am at a loss.
The below piece of code is from a macro that creates a summary sheet based upon the name of the worksheet. My problem is as follows: I have another macro which copies the summary sheet and renames it in the format dd-mm-yy and I want to exclude this from the macro that constructs the summary sheet. How do I modify line 4 to capture the exclusion of all sheets with format ##-##-##? Note: The current line is my poor attempt at doing it.
If (A$ = "Template") Then Goto 10 If (A$ = "Create New Sheet") Then Goto 10 If (A$ = "Summary") Then Goto 10 If (A$ = Like "00-00-00") Then Goto 10
I have a workbook named as "DCR_Summary". In the sheet "FX", I want to get the sum of a specific column from two different workbooks named as "WNCR REPORT" and "DCCR-REPORT". The name of the column is "FXCOLL". The summation should start in row 7 all the way down where data is available. The good thing is that, my sum range will always starts at row 7 in both files but the bad thing is that the position of column "FXCOLL" is changing every day. The expected result is shown in the attached "DCR_Summary". It should pick at the same time the Sheet names where the summation came from. Sheet names is also changing and sometimes the FXCOLL is nil, hence, 0 value can be returned.
There's one sheet that has a list of customers (this is updated very frequently). These customers are either ‘New’ or ‘Existing (as listed in a corresponding column) - would it be possible to have a macro that, when run, will place a copy of existing customers into a second worksheet (“view list – new”), and a copy of new customers into a third worksheet (“view list – existing”), with the main worksheet still listing both existing and new customers.
As the main sheet that lists all customers is updated very frequently (with customers being added and removed throughout the day), would it be possible to clear all contents of the other two sheets that each list of 'existing' and 'new' customers will be copied into, before the two lists are copied into each of the two sheets (just to ensure there isn’t any data in there from the previous time each list was copied in).
I’ve given this a go via the ‘record macro’ function - some users of this WB use excel 2000, and others use excel 2007, but it only seems to work on excel 2007 (which is what it was recorded on)…
I am fairly new to macros and I am currently working on a project where I would like to create a 2 buttons which will filter by date and by owner. The spread sheet I have is fairly large and is added to weekly.
I have two objectives that I am trying to reach:
First I need to filter for all past due task items from the Thursday of the week I am working in back and for a specific person (owner) by the finish date
Second I need to filter for upcoming tasks one week out for a specific person (owner). The objective of this is so that on any given day a user can find any upcoming tasks that are due one week out.
If this is not an option. My thought was to create an input box where the user can input the date and the information on the spread sheet will pull all past due items or upcoming tasks. These two items need to pull seperatly not together.
I know I can create a macro by autofiltering by columns however I am trying to avoid having to go in and change the date each week.
Start date is column E Finish date is column F Owner is column L
I need a macro that will look for a specific text string in the tab names of the workbook and replace it with a new specified text string (leaving the rest of the existing tab names). In other words, a simple find/replace but applied to all tab names in the workbook rather than cells. Ideally, I'd like it to pop up something and ask for the text to find and the text to replace it with, so I don't have to edit the macro itself each time I want to use it, but editing the macro each time is fine. Either way will be wonderful.
I have a workbook with multiple sheets named by month and year that I use to keep track of loans I work with at a bank. In these sheets I have info such as:
Column B = due date Column D = loan# A Column E = loan# B Column F = status Column H = followup needed (Columns A,C, and G aren't important for the current need)
What I am trying to do is create a main sheet (TRACKER) that all I will have to do is press a macro button and it will pull info for each loan that is in a pending status.
I need a macro that will search column F (Status) on all sheets and find each instance of "Pending" and once that is done, copy rows B,D,E, and H in each "Pending" instance and copy them to their designated area on my TRACKER sheet. After that is done I need it to continue to the next "pending" instance and do the same on the next available line on my TRACKER sheet.
The overall goal would be that everyday I can press the macro and it will repopulate the sheet with the current pending items (as each day I will change pending status' to complete and no longer need to track it the next day).
I already have the tracker sheet set up and ready to go with the spaces as follows: Column G&H = Merged cells where due date will need to go Column I&J = Merged cells where loan# A will need to go Column K&L = Merged cells where loan# B will need to go Column M thru S = Merged cells where followup needed will need to go
'Pupil A' could be all the sheets in the workbook and hopefully that will return the names of all those sheets. I made a new question as this seems to be more specific, I will of course update my old question when I get it working.
This is the code I use to call a macro when the macro Im calling is in the same workbook.
However, I would like to call this same macro when using another workbook. I copied the macro "Clearformating" and pasted into a personal macro workbook module. However when I add this code to the sheet tab it will not run the macro.
I have a Sheet sheet1 and I want to run a macro when the cell D2 in Sheet1 is equal to 10,7,5,and 3. I only want this macro to run when those values are reached the macro then puts the data onto a sheet called wps. The macro is run as a module and is a sub macro.
I have a excel file with two worksheets. I need to find a specific row in column g, cut the entire row, and paste it into sheet2. I have started off by using this code, that I got off of some site. It works wonderfully in finding the specific cell, but just copys and moves the specific cell into sheet2. Whereas I need it to cut and paste the entire row where it finds the cell that begins with a 3 in column G.
Sub Copy_To_Another_Sheet_1() Dim FirstAddress As String Dim myArr As Variant Dim Rng As Range Dim Rcount As Long Dim i As Long
I have several macros that email a specific section of a workbook when I run it - I have an icon (image) per section. I want to be able to run a macro that calls one of these section specific macros based on a choice from a drop down list.
It would work this way:
- From the drop down in cell E11 I choose "New Jersey" - I would then click on the email image next to the cell (next to E11) - that macro would call the macro that emails the "new Jersey" section.
I realize there might be a much better way, easier even. However, I already have the other macros written out and would just want to add this step.
I have a workbook with multiple worksheets. Each worksheet corresponds to a certain store fixture estimate. Ont these sheets I have a specific cell where you can input how many fixtures of that type are to be used.
On that sheet also, is a range of cells (ex. Range("A65:F3340")) that needs to be copied to a new summations sheet of total hours to build the project.
If sheet 1 has 1 fixture - the macro should copy the range of cells only once. Sheet 2 has 4 fixtures - tha macro should copy the same range four times appending each set of data tot eh end of the previous, And so on for each fixture sheet.
I have this script (below, Krishnakumar orignally provided this script).
I'm trying to edit it to add cell values from cells C16 and E16 along with the worksheet name it displays in listbox2. So lets say worksheet "rollover" is the sheet being displayed in the listbox2.
I would like for it to look something like this:
rollover TT:'data from cell C16' TA:'data from cell E16'
Public FilePath As String Public dic As Object Public oWB As String Public oWS As String Public aWS As Worksheet
Private Sub CommandButton1_Click() Dim i As Long, wb As Workbook, n As Long With Me.ListBox2 For i = 0 To .ListCount - 1 If .Selected(i) = True Then oWS = .list(i) Set wb = Workbooks.Open(FilePath & oWB, UpdateLinks:=0) wb.Sheets(oWS).Activate Exit For End If Next End With End Sub
I am having some trouble writing a macro to delete cell content. I know which cells I want to clear, but I can't seem to get the macro to do it.
I also want to have something in the macro that inserts data into the lines that I am trying to clear. I want cell A67 to say "Payment" and cell A71 to say "Total."This is the code I am using: Sub DeleteCell() Dim i As Integer For i = 67 To 71 If Range("A" & i).Value = "--" Then Range("A" & i).Delete Next i End Sub
I have data in 2 different workbooks, and I need to transfer all data in 'Jx_ex1' to sheet1 in the 'template' workbook, and all data in 'Gr_ex1' to sheet2 in 'template' workbook. All data should be transferred to the same cell numbers, from A1 to Y5000. I actually have loads of workbooks to transfer to the template but if I have an example with the two then im sure I can work out how to modify it. All files will be in the same folder.
I have a spreadsheet using an Input Form (user cannot get to the spreadsheet to enter data - they must use the form). This is working well.
What I need to do now is allow the user to retrieve data that is already entered. Example: Spreadsheet has 100 unique records (rows). In each is ID, Name, State, Dues, and about 20 other columns of information.
I need to allow the user to key the ID # and then up pops all the other information for just the ID provided. I will also need the ability for them to then change that information if needed.
So if they key 13WIL they will get Wilson, TX, $50, etc. And then they can make changes to any field needing a change. Add a phone, change and address, etc.
I have a large spreadsheet with about 18000 rows or data and about 60 columns. I need to a macro to find a specific word in a column like "charge" and anytime that word is found in the column to insert a blank cell in front of it.
Currently the sheet looks like this:Fee AChargeFeeChargeFee AChargeFeeChargeFee AChargeFee AChargeNeed to get it to look like this: (so I can sort and subtotal)Fee AChargeFee AChargeFee AChargeFee ACharge
how I might 'trigger' a macro to run when a certain cell was filled with any value at all. I have the macro working fine (it's a simple copy and paste special) but I want it to run automatically when the cell A20 has a value in it.
I'm trying to do is definetly simple to a lot of you, but I'm struggling on how to get started. I attached a workbook that clearly shows my work! I'm almost there but not quiet. Basically the user will be able to make a slection that will be used to lookup values from a different sheet. Each selection triggers a ranking number at the bottom (red pattern) in the worksheet. Now I would like to capture all scenarios and display the ranking.
i have this macro that saves into specific folder dependant on cell values and it works spot on with the exception that my po numbers are like st010,st011,st012 etc etc but when it saves it doesnt have the st in front. ive tried numerous ways but to no avail
i have about 80 files that all have the same structure. I also have a general excel file that I need to fill with values from each of the 80 files. I'd like to use a macro that can be applied to each of the 80 files at a time (or at the same time, if that's possible) so I can copy the cells (only the text, not the formula) I need from each individual file to the general sheet.
e.g., each file is:
xyz 123 abc 456 ghi 956
I need to copy the "123" to a cell in the general sheet, "456" to a different cell in the general sheet and so on (to be able to choose which cell in the general sheet I am copying to).
I have a cell built into my spreadsheet that serves as an error check (i.e. returns the word 'ERROR' if certain criteria are fulfilled on the spreadsheet). I'm trying to write something into a Macro that will check this cell and not allow it to run if it states ERROR, returning a dialog box to notify this, is this possible?