Auto-date Code
Jan 3, 2008
http://www.fontstuff.com/vba/vbatut07.htm
The link above describe a VBA code for pop-up calender. I wondering is it possible to have the pop-up calender automatically display by just clicking on a cell in column A instead of pressing Ctrl C. The dates will be only in column A
View 9 Replies
ADVERTISEMENT
May 25, 2014
I am now trying to create a excel macro to auto populate all the dates with reference to a start date and end date. The catch is that only working days are required in the range. My reference cells (start and end date) are in Sheet 1 while the destination cell range are in Sheet 2. The reason for creating a macro instead of a function is that the intervals between the start date and end date changes frequently (annual, semi-annual and quarterly) Best case scenario would be a button which I can just press after i input the dates to generate the range of dates in another sheet.
View 1 Replies
View Related
May 12, 2009
I am dealing with several very large spreadsheets using VBA to do various things. I found that my code worked well, but was taking a long time to run. The biggest time consumer was my use of the AutoFilter features. I have since turned calculations to manual before my code runs and set it back to auto when my code is done running. What are the potential consequences of my turning calculations to manual and then back to auto?
View 2 Replies
View Related
May 26, 2014
i am trying to create a excel macro to auto populate all the dates with reference to a start date and end date. The catch is that only working days are required in the range. My reference cells (start and end date) are in Sheet 1 while the destination cell range are in Sheet 2. The reason for creating a macro instead of a function is that the intervals between the start date and end date changes frequently (annual, semi-annual and quarterly) Best case scenario would be a button which I can just press after i input the dates to generate the range of dates in another sheet.
View 4 Replies
View Related
Dec 19, 2008
Need to add an auto sort code to the end of this worksheet module 2, so that after all the dates are figured, it will sort by this date, no matter how many dates there are.
View 5 Replies
View Related
May 7, 2009
Currently I have an excel form that I am working on. I just figured out how to get it to open when I open the workbook. I am wondering is there code out there that will prompt excel to auto save the worksheet that the form writes to when the "OK" button on my form is clicked. I want to be able to save the data without having to rely on the user to remember to save everytime entry is complete. if there is a code for this function, where would I place it in my code listing?
View 2 Replies
View Related
Oct 6, 2009
Is there a way to have excel automatically save the workbook every 5 minutes or so? I'm not talking about the backup option (tools-options-save) I mean do a hard save?
Or would this warrant a timed VBA code? If so, can someone build me one quickly? I'm kinda in a time crunch - sorry for last minute notice. Co-worker just deleted 8 hours of work bec "she didn't" know to save it....
View 5 Replies
View Related
Jan 4, 2013
I have created a spreadsheet using columns A to G with row one as the following headings Surname, Middle Name, First Name, Alias, Offences, Temp# and CRO#.
The thing is I tried writing a VBA code to let the Surname(column A) automatically sort in ascending order but it doesn't work.
where sorting begins in Column A with the range A2:A5000 and at the same time row one being frozen.
View 8 Replies
View Related
Apr 30, 2009
I am trying to add some code that will auto populate cells based on entries and list selections. In the attached spreadsheet, when information is added to cells in column 'A', the date should auto populate the cells in column 'C'. When a status of "Complete" is selected from the dropdown box in cell 'B', the date should auto populate in the cell in column "D".
The code partially works in that it will auto populate columns "C" and "D", but the code errors out every time and I have to cancel the error to continue to the next entry.
View 2 Replies
View Related
May 19, 2009
If I have 3 fields: zip code, city and state; is there a way where I can have the user of my form enter their zip code and it will populate both city and state. I have the data, I just dont know exactly how to code it.
View 9 Replies
View Related
Jan 22, 2013
Need vba code for excel that will auto add a formatted row when a button is pushed? I have the button made, but I need it to move down a row each time a user clicks the add line button.
View 3 Replies
View Related
Nov 20, 2007
I have a workbook which autosaves and closes if no data is input for 10 minutes. It resides on a drive accessable by all our team and is set so that only one person can have read/ wrote access at a time. It tests for read only, shuts down if it is and saves and shuts down if not.
I have noticed that it doesn't work if the workbook is waiting for input.
I.e. someone starts to enter text, or something, in a cell, then goes off to make a coffee or whatever leaving the entry cursor sitting there blinking. It will not shut down after the ten minutes with no input.
View 9 Replies
View Related
Feb 23, 2009
what the code to auto enable a macro? I have tasks running on my computer. Everytime they run, I have to click on enable macro. I thought there was a way to automate this, but I can't find the code......
View 9 Replies
View Related
Nov 14, 2006
if someone would review the code below and tell me why it does not cycle an autosave more than once. It is supposed to autosave automatically every five minutes but for some reason beyond me it does not. I did not author this but picked it up in a different forum.
Option Explicit
Public vartimer As Variant
Const TimeOut = 1 'set in minutes to whatever amount of time is desired
Sub Timer()
vartimer = Format(Now + TimeSerial(0, TimeOut, 0), "hh:mm:ss")
If vartimer = "" Then Exit Sub
Application .OnTime TimeValue(vartimer), "SaveOpenWorkbooks"
End Sub
View 9 Replies
View Related
Apr 22, 2008
I have a spreadsheet to create with columns A-I, this will be used by others when I am away and the problem is I dont want them to have to keep going into the data-sort option. Is there a way that I can get the items to auto sort into alphetical and numerical order across the columns? Personally I would be happy with sorting the columns manually each time it's accessed but I know the others using the program won't be!! How would it work if its poss? would it auto sort on saving?
View 3 Replies
View Related
Jun 14, 2014
The below is a data sheet which is going to be designed to keep the records of "sending and receiving" details of wash-garments from a garment factory.
Descriptions;
01. Starting from B12, the dates of sending and receiving are entered in the sequence they occur. Both sending and receiving can occur on the same date.
02. Starting from C12, there are reference codes related to the activity, if Sending the letter is entered as "S", and if receiving it is entered as "R". I included this for the calculation or sorting purpose.
03. Columns D to J includes the break down of sizes of the quantities sent or received.
04. column K simply calculates the totals of the columns from D to J.
Requirement : I need to have the totals of each size wise quantities sent and received in the "summary table" as follows;
>> Size wise totals of "sent qtys" to be shown in D5 to J5(referring to the code "S")
>> Size wise totals of "received qtys" to be shown in D6 to J6(referring to the code "R")
>> The dates to be updated and displayed"automatically" in the rows of the column B, when the code letters("S" or "R") is entered in the column "C"
Special Remarks : The last date of sending or receiving cannot be predefined, the rows(dates)will be kept adding according to the way sending and receiving may occur.
View 14 Replies
View Related
Jun 4, 2014
I'm new to VBA but have had it working well for me, until the other night when a user complained that when he ran a macro, it came up with the error "Paste method of Worksheet class failed". I should note that this has worked time and time again, so I'm lost. I also found tonnes of answers with a Google search but they were all relative to that persons code.
So this is the code I am using to paste from the clipboard into another tabbed worksheet :
[Code] .....
View 1 Replies
View Related
Aug 5, 2013
It seemed to be working OK for the first hour I had my sheet open. I then noticed that a variation of the following Sub would not update unless I clicked somewhere else in the sheet or edited another non-included cell. It's like something is holding up Excel from running this function and updating the cells if b2 is greater than a3 then a3 will not update to = b2 immediately.
Private Sub Worksheet_Change(ByVal Target As Range)
If [b2] > [a3] Then [a3] = [b2]
End Sub
My data in column B is formula derived and that formula contains data that is live updated data brought in from DDE link.
My question is, should I setup this formula as part of a macro, instead of workbook code and attach an Application.Ontime function to ensure reliable execution? Could too many IF statements cause delays (about 100 of them currently in the code Private Sub Worksheet_Change(ByVal Target As Range))?
View 1 Replies
View Related
Mar 13, 2008
I want a Macro to be able to copy a formula down from cell A2 down the entire column within the data range. But, the problem I've got is that the spreadsheets I'll be using the Macro on will be different sizes. Currently, the VBA looks like this:
ActiveCell.FormulaR1C1 = "= LOWER(RC[3])"
Range("A2").Select
Selection.AutoFill Destination:=Range("A2:A17340"), Type:=xlFillDefault
Range("A2").Select
So the "Destination:=Range("A2:A17340")" part copies the formula into all cells from A2 to A17340. Other spreadsheets might only have data up to cell A200, or Awhatever - is there a way of getting the macro to populate just the cells in column A but only where there is data adjacent in other columns?
Also, I want the Macro to be able to delete all rows wherever "DELETE" appears in a certain column - I had a look at the "Delete Entire Row Based on Criteria" Macro but I'm looking for a fully automated solution, rather than the question boxes coming up and asking which cell/criteria, I need to run this macro on multiple sheets and the criteria/column position will always be the same -
View 7 Replies
View Related
Nov 17, 2012
Why this error is coming up on a macro. Now to what I'm trying to accomplish is I have 1 sheet called GDL and I want to pull certain data from that sheet into another sheet called data sheet. I have formulas set in the data sheet to pull the information I want. However, I want to create a macro to pull the data for those formula or I guess another way of looking at it would be a auto fill function, except with a macro button. Please see the following error I receive when trying to run the macro.
Run-time error '1004': Autofill method of range class failed. The following is the macro.
VB:
Sub ResetDataSheet()
'
' ResetDataSheet Macro
' Macro recorded 11/13/2012 by asdf
'
[Code] ....
View 5 Replies
View Related
Aug 14, 2014
I am after a VBA code that I can use to populate a fax template based on criteria's
Basically I have records which are being logged throughout the day via a User form and sometimes there may/maynot be a charge. the user decides at the time. The column is named "to be charged" and is filled with either Yes/ No.
I need to be able to select the date to print or Just the same day date and print all faxes' that have "Yes" for charge This way all the information for each fax is populated and the user can just print.
and if possible mark a Colum non the master sheet as printed with a X or something
View 14 Replies
View Related
Mar 13, 2009
I have a report that I run off a database and extract to Excel.
It has 3 fields: Title; FirstName; LastName. For example sake lets say they are in columns A, B, C. Now in D I have a fieldname of FullName and in D2 onwards the formula: =A2&" "&B2&" "&C2.
Now I currently manually type the formula and drag it down to the same row as the last entry in the first 3 columns so that I get the full title in one cell.
I wanted to know how I could enter the the formula above in column D so that it automatically does this for me?
I tried to record a Macro as a test for column D setting the field name in D1 and the formula in D2 and got the following:
View 2 Replies
View Related
Oct 8, 2012
I am not sure the correct term for this but the autofill drop-down menu that pops up when typing code does not come up for me.
Example:
Sheets("Form").combobox1.
I usually get a drop-down menu with a list of members of the "ComboBox" class.
Is there a setting for that enables/disables this?
View 7 Replies
View Related
Mar 3, 2009
i have an excel sheet where i enter company information including Zip code. the zip codes around here all start with 797 and end with numbers from 01 to 12
i am looking for a way to enter just the last 2 numbers and have it automatically insert the full zip
example:
line one i would enter 01 and 79701 would show up in the box.
I know there are ways to do this, just can't remember its been so long since I've had to use excel.
View 9 Replies
View Related
May 22, 2008
Is it possible that when I type data into Cell A1, the date will automatically appear next to it in cell B1? I want this down the column.
the date has to be static. I tried this =if(isempty(a1),"",today()). This works but teh date changes everyday to reflect the current date.
View 9 Replies
View Related
Jul 10, 2009
Is there a way to have a date automatically appear in cell T8 when you first open the spreadsheet?
But every time after that you open it stays the same date as you first entered?
View 9 Replies
View Related
Mar 30, 2013
I have 2 drop downs that when changed, auto refresh all pivot tables. My problem is getting the columns to auto-adjust based on the refresh or change of the data in the pivot table. Listed below the code I have thus far for the auto-refresh on pivot tables. How to auto expand all columns simultaneously.
The pivot tables are based off of tables on a different sheet(TOS Tables). So the code listed below is in the table sheet, not the pivot table sheet (TOS Customer Level). So followup question will be, which sheet to put the auto-expand columns code?
VB:
Private Sub Worksheet_Calculate()
'If data on this worksheet changes, refresh the pivot table
Sheets("TOS Customer Level").PivotTables("PivotTable2").RefreshTable
Sheets("TOS Customer Level").PivotTables("PivotTable5").RefreshTable
End Sub
View 3 Replies
View Related
May 23, 2014
When I enter data in the cells A1 and B1, C1 needs to calculate the result. (not copy and paste)
For examle: I have formula C1=(A1+B1)/2
C column for formula, but shows result only when there is a data in A and B
View 7 Replies
View Related
Mar 3, 2014
I would like to be able to input the Day and date in coloumn A and have the rest change accordingly
I wish to have it displayed as follows Monday 03/03/2014 followed by coloumn 2....Tuesday 04/03/2014.
There are 4 cells for each day set that have been "Merged and Centred". (B2,C2,D2,E2) display "Monday 03/03/2014" , F2 is a split , (G2,H2,I2,J2) display "Tuesday 04/03/2014" and so on.
I can make the dates change according to the first input but since i must also display the day as well.
View 4 Replies
View Related
May 15, 2009
I want a bit of code so that when I insert data into column 'C', it inserts today's date into column 'H' - in the same row. (So when I insert data into C22, the code inserts the date in H22). I want to do it with VBA code rather than an in cell function.
View 2 Replies
View Related