I have seen this before in spreadsheets so I atleast know it is possible.
I have a worksheet that has 6 sheets in it. The final sheet is a formula page that only shows results if sheets 2-5 have data. Sheet 1 holds all the master data. Sheets 2-5 show subsets based on sheet 1. I manually atm filter sheet 1 for certain info and then copy paste into 2-5.
Seeing as I do this weekly. How would I go about adding in a 7th tab or even a macro that will delete all data from row3-end in tabs 2-5, then copy the appropriate data from tab 1 based on a set criteria?
I could write this in a macro just wondering if there is an easy built in way?
I have a workbook with 100 tabs and I have an index page with checkboxes for each tab. I need a macro that will clear all of the checkboxes on the page with one button and a separate macro that will print only the checked tabs.
Can anyone write that code for me so I can just add it into my index tab?
I have this UserForm I need to clean-up but can't figure proper ways of doing it.
There's 2 ways to call the Form: 1) The main Sheet has a Command Button that calls the blank Form, which allows the user to enter & select data to be submitted to the sheet (using combo boxes, etc.).
2) If the user wishes to modify an existing entry on the sheet, he must click on it. This will call the Form which will be populated with the existing data on the sheet (per Row, since the Form enters data one Row at a time).
My problem is that I can't figure a proper way to Initialize my Form to either be blank (as for option #1), ie. have no pre-entered or pre-selected data in it, or to be filled with pre-existing data from the sheet (#2).
I tried to handle this by setting my ActiveCell = A1 when my CommandButton is pressed and check it when Initializing the Form (to initialize for #1 instead of #2), but that's totally not working.
I am trying to setup a file that has three tabs - LIST, COLOR AND PLANT.
I want to be able to select a color or colors (red, blue, yellow, green) and a plant or plants (tree, shrub, flower, grass) using radio buttons, maybe?
If i chose red and blue for a color and chose tree, shrub and grass for plants, i would like to populate the LIST tab with these items.
I'd also like to give an associated value to each color and plant. for example, for the colors, i could choose values between 1, 2 and 3. if i chose red 1, it would add "red 1" to the LIST. if i wanted to later change it to 3, i could do that on the COLOR tab and the LIST tab would update automatically.
What I'm tying to achive is to compare data on two worksheets called "Old" and "New" and to populate the difference on another worksheet called "Diff" see attached file where I have manually added the differences onto the "Diff" tab.
I want to create a command button that will clear whatever is written in a text box. I guess for this to work it needs to select all, then clear. The command button and the text box have been created using the control toolbox.
In ThisWorkbook Userform2 is triggered upon a double click
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
UserForm2.Show End Sub
Userform2 has Frame1 (Option Buttons 1-6) and Frame2 (Option Buttons 7-12)
Private Sub OptionButton1_Click()
Call ProjectBuildings Range("A1").Select End Sub
Private Sub OptionButton10_Click()
Call BondIndustrial Range("A1").Select
End Sub
The user can click away and things work great. The macros that are triggered search a number of Workbooks and individual Worksheets looking to select either of two (hence the two Frames) specific items.
If the user clicks any Option Button in Frame 1 (works) then any Option Button in Frame 2 (works) then goes back to the same Option Button in Frame 1 (nothing) I have a problem.
How do I clear the first Option Button in Frame 1 after the user selects another Option Button in Frame 2?
What codes can I use so that when I click CLEAR FORM, all the data that I encoded in the textboxes of my current userform will be erased as if I have a fresh new form?
I'm just finishing a project that is a collection of three calculators, each of which returns data based on a series of user-supplied variables. All the mechanics are working [thanks in part to replies to previous posts], but there is one more thing I'd like to add:
Does anyone have a way to clear the contents of another cell [actually several] cells via another cell? As the most complex calculator requires eight variables to be entered, I'd like to provide a quick way [a button?] to "clear" or "reset" the calculator - basically wipe all unlocked cells. I should note that all of the cells in question already have Data Validation of one type or another.
I'm putting together a time sheet that can used to calculate total hours worked by department etc. I plan on protecting the worksheet and only allowing certain cells to be selected and data entered.
Is there a way using VBA to place a button on the first spreadsheet that will clear all cells that are 'unlocked'?
I have created a command button, right clicked the button and selected 'View Code'. In the code window I've entered the following code:
Private Sub CommandButton1_Click() IB_FB_Hedge_3 Outcome.range(W10:X11).ClearContents End Sub
As soon as I enter the code a message pops up:
"Compile error:
Expected: list separator or )"
Is my syntax wrong? Is the sheet name, 'IB_FB_Hedge_3 Outcome' not allowed?
When I created this code a few minutes before I was not having the 'Compile error' problem, but the Command Button was not working either. When I clicked the command button it would just show the circles at the corners, suggesting that it is still in editing mode and not properly activated as a command button.
I keep encountering an error while creating multiple sheets within the same workbook. This is a known error by Microsoft as documented here. In order to avoid using multiple workbooks i need to clear excels cache each time I run the macro as i have limited users sheet creation to 30 sheets which should not trigger the error. Does any one know a code to clear excels cache or memory?
I have used cutcopymode = false but that does not do the trick.
Function FindNth(Table As Range, Val1 As Variant,Val1Occrnce As Integer, _ Val2 As Variant,Val2Col As Integer, ResultCol As Integer) Dim i As Integer Dim iCount As Integer Dim rCol As Range For i = 1 To Table.Rows.Count If Table.Cells(i, 1) = Val1 And _ Table.Cells(i, Val2Col) = Val2 Then iCount = iCount + 1 End If If iCount = Val1Occrnce Then FindNth = Table.Cells(i, ResultCol) Exit For End If Next i End Function
To use this function, push Alt+F11 and go to Insert>Module. Paste in the code, push Alt+Q and save. Use the function as shown in graphic example. You can access it under "User Defined" in the Paste Function (Shift+F3).
Type Amount Sex Cost Purchased Cat 1 Male $ 5.00 22/05/01 Cat 2 Male $ 5.00 15/00/00 Dog 3 Male $ 20.00 25/04/00 Rat 5 Female $ 1.00 15/08/01..................
I am trying to create a command button in Microsoft Excel (Office 2000) that enables me to reset the check box status for a worksheet from checked to unchecked. The worksheet contains approximately 50 check boxes and is meant to be reused. Is this possible? If so, how can I program it to do so?
I had a friend attempt to help me with this issue but he couldn't figure it out. He suggested that I tried asking around here.
Here is what I am trying to accomplish: (I am happy to email anybody the spreadsheet to help out with this description)
1. There are two spreadsheets. One spreadsheet with about 25 tabs (one for each store number) and one spreadsheet with one tab and about 1400 lines of information that is sorted by store number. To preface, this 1400 line spreadsheet can be 900 lines one month and 2500 another month, so it fluctuates.
2. From this spreadsheet sorted by store, I will highlight, cut and paste into the corresponding store tab on the first spreadsheet. Also, at any given month, the information fluctuates, it can be 15 lines for one store one month and another month it could be 5.
3. Once I am done cutting and pasting it all into each seperate tab, I have a 26th tab that I am looking to create a button that will then pull all that information into the 26th tab.
I know - first question is why would you want that? You already have all the information from that original spreadsheet. Well, in these store tabs, I have everything perfectly formatted a certain way and I only really cut and paste the information that I need from the 2nd spreadsheet.
I have a spreadsheet that my friend claims he got close to working it out.
Just to add, I would need this button to take into account that the information in each tab fluctuates and also that it is easy to add a tab if I add stores.
I searched a few times for the answer to my problem, using different search terms, but I've come up somewhat empty (this *might* be because I'm not up-to- speed with Excel's terminology?). Anyway, my problem is this: I have a workbook which is designed to track various data for a corporate training course ( sheets for attendance, grades, tool logins, etc). After all of these are sheets numbered 1-25 (we never have more than 25 students in a class, but usually around 20). The numbered sheets correspond to the student's number in the on the class list sheet (so, the first student would have personal "report card" information on sheet 1; the eleventh student in the class list would have their information on sheet 11, etc).
What I would like to do is have some way of putting a button on the class list sheet which would look at student list and rename the sheets to correspond to the student names. For example, if the fifth student listed was 'John Doe', it would rename his personal sheet ('5') to 'John Doe'. Obviously, I would need to do it for all of the students, and IDEALLY it would then get rid of any numbered sheets which are not used (having 21 students would only rename the first 21 sheets, but then hide sheets 22, 23, 24, and 25).
I made a button in excel that when pressed automatically pops up a outlook email window with the excel file attached to it and written information that i want in the emal.
is it possible for me to have data from certain cells in excel populate automatically in the outlook email when i press the button to have the email popup?
what i would do is have certain words from some cells in excel fill in some blanks in a paragraph i have in the email that pops up when i press a button in excel is this possible of so how can i do it?
i am trying to say i will paste the VB code i have that allows me to have outlook email pop up with information i have in the email....
I need the tabs of a project action log to auto-populate and auto-delete in a master log. (So when something is added or deleted in a tab it is added or deleted on the master) I use excel a little bit for work and personal finance purposes but I have zero experience with macros or VBA.
What i would need is a script so that it doesn't look at those specific cells but a range of cells and every time the button is clicked it will fall into the first empty cells.
So example when button is clicked Case 1 if cells C242 has something look at cell C243 If cell C243 has something look at cell C244 If cell C244 has nothing then enter data that goes with that button. I have around 6 to 7 different buttons.
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
1) We need the Input screen to auto clear the fields once the " Save " button has been pressed and data transfered to the appropriate tracking sheet
2) We want to ensure that if any of the Red cells are empty the " Save " button will give an error ( one complication If the "Transfer Type" highlighted in Blue has an entry " either STD/ISD/ESP " then " Call Purpose " needs to be mandatory
3) somehow the information on the "Comment " field is not getting captured
4) If possible we want a warning indicator if two rows in a tracking sheet ( example London ) are the same based on Coloums B to I ( except C )
5) Is there any possibility to give a pop calender in the " scheduled date " section of Input screen (Row 33)
I have a summary page that includes the titles for each tab within the excel 2003 workbook. I want to use the names of the tabs in the summary page and create it into a formula to lookup fixed cells within the various tabs. Sorry for not uploading an excel doc but I was at work earlier and the thread did not load for some reason, so I am reposting it.
I'm having a problem with a macro clearing a formula in a cell. I have the same type of cell that doesn't have the problem but I can't find the difference between the 2 cells or difference in vb that's making it happen. I have to intentionally cause this to happen but don't see why it's happening. Do I need to attach workbook and describe what's happening? I have been copying and pasting from different sources as well as paying to have it created/started but it was expensive(for me) and I make nothing off of it, just use it at work. I am not proficient in Excel or vb but I'm desperately trying to learn as I go so as not to fork out a few hundred dollars again.
i have two fields with dates - one field A1 for date authorised (for a data request) and one field B1 for date actioned (data request)
i need a formula to populate in C1 the following:
if A1 is blank then C1 is 'not actioned' if B1 is blank then C1 is 'not complete' if both contain dates then C1 to calculate the number of working days between the dates eg. A1 10.08.09, B1 11.08.09...C1 = 1 working day