I have a number of sub routines that manipulate data in various ways to which I have assigned various shortcut keys (Ctrl + whatever) However as there are quite a few of these I wondered if it was possible to create some sort of pop up box in which I could list the shortcuts, the box being able to be opened and closed at the users request.
I can of course do this with some sort of userform but when this is open I can't then work on the sheet. Also as this would presumably be opened from within some code, waiting for the user to click the close button then wouldn't this prevent the other sub's from executing.
I wanted to know how do I keep a toggle button in the on(ture) position after I close the userform? How do I keep the toggle button off(false) positoin after I close the userform? In order words, once I run my macro again, I want it to remain in memory that my toggle button was in the on(true) or off(false)?
For example,I have an application that I am developing which involves some what-if analysis for some projects. There is a command button located on my worksheet. After the command button is clicked, I have include some toggle buttons on a userform for all of the various projects. If I assume that sine projects will not be used, I click the associated toggle buttons. This puts them in the on(true) position. After I close the userform and reclick the command button, my toggle buttons are all back in the off(false) position.
Attached is a screen shot of a bit of a file I made to use daily. It needs to be used by many people and always starts out new each day. I'd like to make the comments on the right stay "full size" when the sheet is scrolled down (it needs to be able to scroll). The top 3 lines are "fixed" and don't scroll. I've tried comments ( currently ), pictures, imported pictures...everything I know to try. How can I make the comments box persist without "rolling up" when the remainder of the sheet is scrolled?
I have two columns. When I enter any value in column 1, I want the other column to give today's date automatically. I want that date not to change tomorrow and remain as it is. I have to make such entries everyday.
i am wondering if there is a way that i can have these cells that depend on formulas to remain blank, until i have my data entered, or that they may remain blank, but give me running totals of only the cells i have inputted.
Amount Amount Item Total Account $ - No Profit$ 629.50 $ - $ 629.50 No Profit$ 46.29 $ - $ 46.29 No Profit$ 2,333.01 $ 233.30 $ 2,566.31 233.3 $ - No Profit $ - No Profit $ - No Profit $ - No Profit #1 If there is an amount in column B, I want column D to reflect that amount.
#2 If there is no amount in column B, I want column D to state the words "No Profit."
#3 Already in column B is the formula =C1-A1.
I tried =IF(B1=0,"No Profit",B1) but when I copy that formula down the spreadsheet, it inserts "No Profit" into all of column D. I only want "No Profit" to exist when there is a $0 resulting from the formula mentioned in point #3. When there is a blank cell in column D, I want it to remain blank until an amount is entered in that row?
I know how to reference cells from one sheet to another but for some reason I cannot for the life of me work out how to do this and that particular figure remains even after sorting sheets? Basically every time I reference some numbers its fine but when I sort the original sheet being referenced the figures are all wrong. I tried linking the cells and that didn't do it either?
I need to copy it to numerous other cells. However I need the row fourteen values to remain the same while the other values change according to which row I'm copying it to e.g
I have been struggling to get dates to remain in a consistent format within my Excel 2003 worksheets. I would like to work out how to keep them permanently in the "dd/mm/yyy" format. I have tried several formatting options. The current method I will explain below:
I have several forms into which the 'date' is automatically entered using the - Format(Date, "dd/mm/yyyy") code. This is then saved into cells on a worksheet using the code
At this point if I do a search for a date, lets say 23/03/2012 I can retrieve it and everything related to it - all seems fine (also all dates are visually in the correct format in my cells etc).
The problem arises when I exit Excel and save the workbook. When I go back into the workbook at a later time and try and search for the same date it won't work. Although the dates in the cells still read for example 23/03/2012, the search requires me to now use the format 03/23/2012 to retrieve the information (It seems like in the background the date has reverted to the US date format upon saving and yet visually it is still how I've set it up).
On Sheet 1 I have Data Validation Lists set up. On Sheet 2 I have the information populating from what is entered on Sheet 1, only problem is...when I don't have anything entered in the cell(s) on Sheet 1 then the cell(s) on Sheet 2 reflect 0. I would like the cell(s) to remain blank if nothing is entered on Sheet 1.
I have created a spreadsheet which is tallying up various data. I have a number of different categories e.g. A, B, C, D and within each one of these are sub categories. I then have a tally for the number of each category and within that the number of each sub category. I then want to sort the data so that first the main category is sorted in order of highest tally to lowest. the sub categories however need to stay with their primary category. I then need to sort each sub category within the main category.
I want a specific workbook to be always on manual but when I open other workbooks I want them to remain on automatic even though the first workbook is set on manual through vba code. Is that possible to be done?
This is the code I run:
Private Sub Workbook_Activate() With Application .Calculation = xlManual .MaxChange = 0.001 .CalculateBeforeSave = False
[Code] .....
I know that Application. Calculation refers to all open workbooks but I don't know the code to specify the manual calculation to this workbook only while others are open.
I have created a custom floating toolbar that works perfect (thanks to all the reading on here!). My workbook is a stand alone estimating tool that many users will have a copy of.
I have two things I want to do yet but I cant find it on here.
1) My buttons on my toolbar - I want to have custom icons. I can do this temporarily but when I exit my worksheet and re-open they are lost. Is there anyway to save a custom icon. I am willing to add it to the icon list if necessary and then when users open the workbook copy the custom icons onto their computer. But I am not sure how/where I could do this.
Worse case, can I color my button text?
2) When my toolbar appears, it is wide, all buttons are going left to right. I want the size to be small width so the toolbar buttons are on top of each other. Any thoughts? I tried adding a .width but it didnt work.
I have a workbook that contains 50 worksheets named 1-50. I need to add more worksheets. all the formulas in the worksheets always refers to the previous worksheet.
How can i make a copy of the worksheet named 50, name it 51 and have all the formulas in worksheet 51 refer back to worksheet 50?
I have a workbook with 4 worksheet that store different type of data. It also has a userform that load at start of the application which is to search the data in the workbook. The userform has a combobox where the names of the sheets are stored. when the user selects say Sheet2 in the combobox, it enables the relevant textboxes on the userform and activates the worksheet at the change event. The userform has a search button that searches all the worksheets based on the text entered in a textbox.
The problem: how to search based on 1 textbox. What I want is: say for e.g the end-user selects sheet2 from the combobox, this intern enables 4 textboxes (Name, DOB, Nationality, ID #) on the userform. The end-user should have the liberty to enter data in 1 and/or any of the textboxes. The search should be performed, that if data is only in 1 of any of textboxes then give all rows that fit that criteria and display in a temp worksheet. if say the name and dob is filled by the user than what matches both should be displayed in a temp worksheet. if say dob, name and ID# given so the search button should narrow down to fit all 3 criteria and then display result in temp worksheet. As if mentioned data can be entered in either just 1 or any or all textboxes.
E.g. the worksheet is (Columns are Name, Nationality, DOB, ID#)
row 1 = name: Steven Martin, DOB: 27-may-1993, Nationality: Trinidad & Tobago, ID #: 1234567 row 2 = name: Gary Richards, DOB: 2-FEB-1993, Nationality: British, ID #: 456789 row 3 = name: David Cohen, DOB: 27-May 1993, Nationality: American, ID #: 98765 row 4 = name: Roberto McDonalds, DOB 21-Jul-1962, Nationality: British, ID # 654321 row 5= name: Gary Richards, DOB: 01-Dec-1978, Nationality: Australian, ID # 1234567
Now if the user enters only name as "Gary Richards" and search then row 2 and 5 should be displayed in a temp worksheet. if user enters name Roberto McDonald and ID# 1234567 then it should not display anything. if user enters DOB 27-may-1993 and nationality British and ID # 1234567 then as well shouldn't display anything and should a msgbox "no data found".
I am fairly new to macros and have trouble with VBA. I have a file with multiple worksheets. Each worksheet contains the name of a specific location in cell A8. I want this name in cell A8 to be the name on the worksheet tab for each worksheet in my file but do not know how to accomplish this. Is that even possible?
I need to reference the projected and actual expenses from the total on worksheet 'expenses' So i did so, however, if I change the drop down on the expenses worksheet to only display housing data, then the projected and actual expenses on my budget worksheet changes as well to the new data portrayed on the expenses worksheet.
I need to reference the cell, without it changing when I change the category display, but I need the cell to change accordingly if I enter new data in the overall tablet on the expenses worksheet.
Or do I need to create a seperate worksheet that has the data in and reference my cells on my budget worksheet to that new worksheet?
I've been tackling this data capture/paste issue for a week or so. I found the string below which does provide a good foundation for my challenge. But, my basic level of understanding macros limits my modifications to meet my needs.
[URL] ......
I have 20 worksheets in my master file corresponding to Excel files individual associates will update weekly. After the associates have updated their individual files for the week, I want to capture the data entered and paste values into a master file containing a worksheet for each associate (sharing the same name as the individual associate file). All of these files are housed on team SharePoint sites.
I need a macro to perform several steps after clicking a "Run Update" macro button in the master file: Open individual associate fileIn master file, search for each Initiative listed in column B (starting cell B3) in the individual associate file (in column B starting at cell B11)If Initiative is found in individual associate file, copy adjacent data in columns D:J for the respective rowIn master file, paste values to the corresponding Initiative row for the corresponding week's worth of dataIf Initiative is not found in the individual associate file, move to the next Initiative listed in the master fileRepeat these steps for each individual associate file
Linking would be the easiest way to accomplish this if I wanted to have a multitude of weekly individual files for the associates. However, I'd rather each associate have one file for them to update (basically overwriting their previous week's entries).
I need to ensure the paste values corresponds to the appropriate day of the week. In simpler terms, if the date in the individual associate file in cell D9 reads Oct 1, 2012, the data captured from that row needs to be pasted to the corresponding row/column in the master file that reads the same date.
coding a VBA macro for one of my workbooks, in which I need to be able to hide/unhide various rows in one worksheet depending on the value of a cell in a worksheet elsewhere in the workbook. The rows start off hidden by default.
As a simplified example:
Worksheet1 has a cell that has option "Set 1," and "Set 2." Worksheet2 has two sets of rows (say, 20:30 and 40:50) that need to be hidden/unhidden depending on the cell in Worksheet 1. These are hidden to start with!
So if Worksheet1's target cell says "Set 1", then on Worksheet2, rows 20:30 would stay hidden and rows 40:50 would be revealed, and then if the target cell says "Set 2," then on Worksheet 2, rows 40:50 would then be hidden, but rows 20:30 would then be revealed.
I was thinking of using something like this:
Rows("20:30,40:50").EntireRow.Hidden = True If Target.Address="'Worksheet1'!A1" Then If Target.Value = "Set 1" Then Rows("40:50").EntireRow.Hidden = False Else Rows("20:30").EntireRow.Hidden = False End If End If
I think this might work, but every time I try to run this I get various errors, like not referencing my target cell correctly.
I want a macro in one worksheet to run when any cell (in a given range)on a different worksheet (dataentry) is updated. I have spent along time trying to make it work with no avail. The code I use to start my macro is as follows.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count <> 1 Then Exit Sub
If Target(1, 1).Address = "dataentry!H5:IV72" Then If Not Intersect(Target(1, 1), Range("dataentry!H5:IV72")) Is Nothing Then
On Error Resume Next Application.EnableEvents = False
Workbook contains the following sheets : PIR TrackerChartsSAMPLEFINALValidations
When a change occurs on PIR Tracker, the following occurs:
VB: Private Sub Worksheet_Change(ByVal Target As Range) Application.ScreenUpdating = False Dim Rng As Range Set Rng = Intersect(Target, Range("A1:A500"))
[Code] .....
I also want the pivot tables on SAMPLE and FINAL to be updated. What do I need to do?
Each petition can generate several tasks, one line per task.
John Doe | XXXX-YYYY | NCO John Doe | | RIL John Doe | XERT-WWWW | RMT Jane Doe | QSZE-AQWC | RIL
On the second worksheet:
Complete list of agents | number of petitions | Status
John Doe | 2 | OK Jane Doe | 1 | [BLANK]
I want to be able to fill in the second worksheet automatically. For each agent in my worksheet 2, I want to check if they appear in worksheet 1 and if so count the number of petitions related.
I'm a novice Excel 2007 user and appreciate all the help I can get. I have a workbook with monthly worksheets in it. When a certain data Type is selected from a drop down menu in that monthly worksheet than I would like to have it automatically enter specific data (Name, Date, Eval, Type) copied to another worksheet (CC) in the same workbook. I have been manually entering the data so far. Another thing, some of the data will be entered into the Monthly worksheets and some will only be manually entered into the CC worksheet so it would need to accomodate both methods of data entry. Please let me know if I need to clarify. I have attached the workbood, too.
I'm trying to create a macro to merge multiple rows into one cell and display in a new worksheet.
This seems really simple but I've tried to re-work some other examples I've found online but none seem to do exactly what I need. I'm also pretty new to VBA , so it's highly possible i've missed something.
I need to display each set of Notes for each DonorNo in one row - with each note separated by a space.
I've attached a sample of the data and what I need for the output. In the actually file I have around 70,000 records so the prospect manually merging the rows is horrifying.
I have an order form created in excel with a list of about 1600 products. I have a column set up for the customer to place the ordered amount of each product. What I need now is a way to transfer only the rows that have a value in the "ordered" column to a new sheet. I have seen it before , but don't know how it was accomplished.
Here is the above link. Am looking at a button which saves whatever is the temp worksheet row in the customers worksheet. The temp worksheet basically takes the data from the Quotations worksheet and places it in a row.