I have attached a test workbook excel 2010 (ignore ref# errors, I've cut the workbook down for uploading purposes) What I would like to do is have a 'Button' on my 'information Sheet' which when clicked would clear certain cells. I have searched the forum but can't find a solution, everyone seems to want to delete rows or columns but I just want to clear certain cells. The workbook will have 11 sheets each named 'caravan 1' through to 'caravan 11' The uploaded test workbook only only has 3 sheets.
On 'caravan 1' (which is slightly different to the other 10) I want to clear the content of cells
On all other 'Caravan sheets' I want to clear the contents of cells
D4 & D5 E4, E5, E22, E23, E41 & E42
It would be icing on the cake if it could give a warning such as " are you sure you want to clear these cells" but that isn't really necessary. The worksheets will be password protected, but the cells mentioned above will not be. If it proves too difficult to clear all the cells on all the sheets with one click, then perhaps a simpler solution might be to have a button on each sheet instead
EXAMPLE: Complete Sheet called "Day1". When day1 is complete you click on button and it then copies itself and creates and renames new sheet to "Day2", then when "Day2" is complete you click on button and it then copies itself and creates and renames new sheet to "Day3", and so on and so forth to "Day30".
Iam looking for macro to copy rows based on partial cell content of a column. I have an excel spreadsheet called "arc.xlsx" from which I would like to copy data to other few new excel files when certain criteria are met. The excel file contained location is C:Documents and SettingsxxxxDesktopCompany.
Below is a sample of arc.xlsx
GP CUST_NO BR CUST_NAME day mo year I1 999999 1 SMITH 0 8 9 I1 999999 ab SMITH 4 8 9 I1 999999 cd SMITH 4 10 9 I1 999999 1 SMITH 4 1 10
I would like the macro to copy rows that have 'ab' in the column c (with title BR)and save it in a new excel file with name ab.xlsx in the same location folder.And the same for 'cd', '01' and '02' by saving the data in files with name cd.xlsx, 01.xlsx so on.
I have attached a 97-2003 .xls file with data for multiple store locations on sheet 1, and the desired result on sheet 2. I am actually using excel 2007, but I dont think I need any special features that it provides.
I will try to explain the issue here without opening the attachment.
I have a macro set up on a command button so that when you click the button, it takes the info that you entered and puts it into line form on a seperate sheet. I need it to clear the original sheet after this happens, but the way I have it set up, when you remove the info from the original sheet it removes it from the second sheet. Does any one have a sample form that submits information this way? I think I can figure it out if I could see how someone else has done it.
The form is set up so that the user has to enter their name and then go through a series of drop down boxes, and select the correct options and then submit the form when done.
Hi all! I'm hoping someone can help me as I'm trying to complete this for work ASAP. Here's the story. I want to automatically fill out the Monthly Log sheet using the information provided on the "Full Staff" sheet. If E9:E227 in the Staff sheet is listed as "CO", I want to copy the corresponding cells over to the corresponding cells in the Monthly Log Sheet. Also, I want it to automatically paste the information in the next available row (say rows 1-15 are being utilized, I want it to post in 16). Can anyone help?
I need multiple macros to copy information from sheet1 to sheet2 and another to copy the information from sheet1 to sheet3 and so on. need a total of 20 macros each to copy information from sheet1 and paste it to the corresponding sheet number. How to do it and this this is what i want to do, Copy roll A-B-C-D,and G but not E-F-H i have formulas that i don't want to clear or re-do every time it is possible to do this.
a B C D E F G H HarvestDate VarietyL/P Code Label Pakagin Qty Total 1 12/2/2012 Soda 23 3 1 12/12/2012 plants 24 34 1 12/13/2012 socks 25 22 1 12/14/2012 shoes 26 22 1 12/15/2012 tie 27 22 1 12/16/2012 cds 28 22 1 12/17/2012 computer 29 22 1 12/18/2012 tapes 30 22
I have a spreadsheet that I have created as a door schedule for faculty members at our institution of higher education. The intention is for them to fill-in their office hours and courses along with a few other bits of information. One sheet should have their teaching and office hours and one sheet should not.
These are the cells that should be cleared once the sheet has been duplicated (F30, F31, G30, G31). Once the sheet is duplicated and those two cells' contents has been deleted, both sheets should be printed. Ideally, all of this would be initiated by clicking a hyperlink or something like that.
This macro clears all the contents of each sheet to which it refers, however, after putting it to use I find that I need it to clear only columns A-G starting at row 10. I am not sure how to modify it to do so though. Actually it would be even better if it would only clear columns A, B, C, E, F, and G.
I have a macro that copies data into another sheet (OR) from sheet1 (EDS) but as I don't want the data added from the last row I want it to overwrite and clear any data that was there before. However I still want to keep my headings which occupy rows 1 and 2.
This is pretty inefficent but it works. I don't want to make a new macro I like keeping it inserted in my current one. However I couldn't figure out how to get it to delete the rows past row 2 (it could go to infinity but I don't think there will ever be more than 30 rows of data).
I guess this is a simple one but I am not sure of the best way to do it, I have number of points recorded for everyday in an excel sheet where first column represents date, second column represents group third column represents line and fourth column represents point as shown in the example below
3 19 2222 4324
"3" and "4" represent the 3rd and 4th day of the month, "19" represents the group and 3rd and 4th columns rest are line and point numbers recorded (2222 is first line of day 3, group 19 and 4324 is first point of line 2222 of group 19 on 3rd day and so on....).
I need a macro (or formula) to copy the cells of the last day written in the sheet up to the last row to a new excel sheet, reformat them so that first column has the word "Date" in its first cell, second column has the word "group" third has "line" and fourth has point.
so in the example mentioned here I need it to copy the cells of day "4" including the group, line and point numbers and format them in the new sheet so that first column has "DATE" then 4 for the rest of the rows, second column has "group" and 19 in the rest of the rows, 3rd column has "Line" and all line copied up to last row, 4th column contains "point" and all points copied.
Im looking to ensure the sheet contents are clear before continuing with the macro routine. At the moment however, the macro runs I see the data flash up and then off. So it appears the data is being cleared as soon as it loads. Current code is:
I need to create a macro that can create a dynamic copy/paste loop. So far what I have is horribly inefficient. Each row in colmn A(minus the header) has a unique number in it. For each unique number, I need to paste it based on the number of column headers in row 1(minus column A). So, if there are 20 column headers, I need to copy cell A2 and paste it 19 times in another sheet. Then, I need to move to the next number in column A and do the same thing. Here's what I have:
You can see that this is not dynamic. If I add another row to my table and rerun the macro, it will not catch it. I've attached a sample file to show you the big picture of what I'm trying to do. The data that I have is in Sheet1, and I'm trying to get it into the format in Sheet3. Rows/columns will be periodically added to the table in Sheet1, so the macro needs to be dynamic to catch that. The data in Sheet3 will always remain, and the macro will add the updated data below the old data in Sheet3.
I have a set of data on sheet1 indicating test scores and basic information. At the top of the data, I have some drop-down menus that allow me to select certain minimal score results. I used conditional formatting to highlight the rows of individuals that meet the selected criteria from the top of the screen. You will notice in the screenshot, that I placed a button at the top called "Go!". Ultimately, I'd like for when I push the "Go!" button, Excel will copy the highlighted cells and paste them into sheet2 (beginning on row 2 as I have a title bar in row 1).
I want to create a macro button that can create copy, insert, paste and rename the new sheet in next month's name, like if the active sheet's name is January, I want to copy the whole sheet of January, insert new sheet, paste the new sheet and rename the new sheet to next month like February?
Also rename the new sheet (February) cell B3 the same as new sheet's name (February)
So if month of February is near end, the macro button in February will create the same way as Jan did which means the next sheet will be named March and so on.
Macro to clear cells with numbers but no cells with formulas with in this macro:
Dim i As Long i = Range("E3") If i > 0 Then ' Copy range Range(Cells(6, 10 + i), Cells(500, 17)).Copy Range(Cells(6, 10), Cells(500, 17)).Select ' Paste special ActiveSheet.PasteSpecial Format:=2, Link:=1, _ DisplayAsIcon:=False, IconFileName:=False ' Clear i columns on the right Range(Cells(6, 18 - i), Cells(500, 17)).ClearContents End If End Sub
The range is where the cells with numbers need to be cleared but not the ones with formulas.
On the attached spread sheet here is what I am trying to do. In B2 I will either enter D (digital label) or F (Flexo label). With that than if a D is entered nothing else will happen with in spread sheet but if F is entered D23:Q40 will need to be cleared out and blank.
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
I have a workbook with a hidden sheet ("Template") and a visible sheet("New Job"). I need code so when cell F1 in "New Job" is populated:
1-the sheet is renamed to the value of F1, 2-a new tab is made (a carbon copy of the hidden sheet "Template") 3-the new tab is named "New Tab" and marked as unhidden.
Public Sub Worksheet_Change(ByVal Target As Range) ActiveSheet.Name = Range("F1").Value End Sub
Function WorksheetExists(SheetName As String, _ Optional WhichBook As Workbook) As Boolean Dim WB As Workbook Set WB = IIf(WhichBook Is Nothing, ThisWorkbook, WhichBook) On Error Resume Next WorksheetExists = CBool(Len(WB.Worksheets(SheetName).Name) > 0) End Function..................
I have about 100 products and each has its own sheet that I fill with data. Once I have finished with a sheet I rename it and create a copy and then hide the original and delete the entered data from before and start over.
Is there a way I can make it so when I hide a sheet it will automatically create a copy and delete a specific range?
I'm trying to create macro that will clear the contents of the cells in the 4 columns to the left of a cell that = 0 %, as well as the cell that = 0%. For example, if cell F13 = 0 % then the contents of B13:F13 would need to be cleared. The range in which data is being pasted into is B13:F27.
is there a way to do this in VBA? I've also read: - Dave Hawley's recommendation of using: Sheet1.UsedRange.SpecialCells(xlCellTypeConstants).ClearContents
from another thread (which is excellent!)
- SHG's recommendation of using a named range, for example:
Given my limited knowledge of VBA, how would I now combine the two to write a VBA sub-routine that clears a named range entitled "Entry" on a sheet entitled "Data"? Would the following be the correct syntax: Worksheets("Data").Range("Entry").SpecialCells(xlCellTypeConstants).ClearContents