Updating Forecast / Actual Sheet With A Macro
Jun 6, 2014
So I am trying to make a macro that will update monthly forecast data to what the actual production/consumption data was. The production/consumption numbers come in separate workbooks (i.e. "Jan14", "Feb14") and need to be linked to the 'Book' main file. The path needs to the Jan14 needs to come into the 'Book' file, not just the values. I would like to be able to just have a button above each month that will just automatically load that month's data when it becomes available.
View 1 Replies
ADVERTISEMENT
Mar 29, 2007
what is the formula to calculate variance in Excel between the actual data and the forecasted one?
View 9 Replies
View Related
Apr 4, 2014
I have a 52 week rolling forecast that I would like to have displayed in each calendar month that it corresponds to. I have come up with a solution where it does lump the data together into months but it is not a smooth lumping of the weeks as some weeks cross over from one month to the next. Is there a way to lump each week into its respective month. My current solution places in some months 4 weeks worth of data and in other months 5 weeks worth of data. Attached is the spreadsheet that I am using. The tab "Weekly Sales" is the 52 week data which has specified the exact dates on the calendar that that week represents. The "Monthly Sales" tab has the 12 week data which has specified the exact dates on the calendar that that month represents. I've tried SUMPRODUCT but that is giving me 4 weeks in some months and 5 weeks in others.
View 1 Replies
View Related
Jul 20, 2013
I have this code on my sheet1:
VB:
Private Sub Worksheet_change(ByVal Target As Range) Dim KeyCells As Range
Set KeyCells = Range("K:K")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
If ActiveCell.Value = ActiveCell.Offset(0, -6).Value Then
ActiveCell.Offset(0, 1).Value = ((ActiveCell.Offset(0, -4).Value) * (ActiveCell.Offset(0, -5).Value)
End If
End Sub
Now I would like to add another code: When I will change value in actual cell (sheet1) then copy value from cell A1 (sheet1) to the first free cell in column A (sheet2). I still have problem with error that I am out of range if I tried to copy it to sheet2.
View 2 Replies
View Related
Jul 22, 2014
I extracted data going back to 1980 from Bloomberg and realized that BB uses abbreviations rather than pure numerical values. For example, 3,000,000 is "3M," 300,000,000 is "300M," etc. I need a macro that converts "M" into the actual value, "B" into the actual numerical value, etc. For example, a macro that converts "3M" into 3,000,000. I know that I can identify the values in VBA with "###M."
View 7 Replies
View Related
Nov 12, 2007
I have a summary sheet which shows a range of information to give a full overview of the main information from individual feature forms.
At present, the manager is manually linking the cells from this sheet from the individual feature sheets with the normal =A1 kind of formula.
Is there an easier way to do this?
The solution would need to insert a new row each time in the summary sheet and pull out about five key bits of information from the feature sheet.
View 9 Replies
View Related
Aug 28, 2013
I'm looking for a formula that would take the newest figure from a column in sheet A and update cell in sheet B. Every week it's going to be a different cell in a column in sheet A (always one below last week's) but the same cell in sheet B.
Basically I would like one cell in sheet B to show me most recent information from column in sheet A...
View 4 Replies
View Related
Aug 4, 2006
For the last few weeks this has been the place to be ;-). I have a question. Is there anyway to update a hyperlink automatically if the name of the sheet changes?
I have about 70 sheets and the names change every 22 days so I have it now for the value in the cell to update every time the sheet name is change but the hyperlink still is looking for the old sheet name.
View 5 Replies
View Related
Jul 2, 2012
Clicking the Add to DB button will add new items but not existing one.
now, what I want to do is to first, populate the existing TIN and then do the necessary update.
my basis for update is txtTIN.value
Here are the codes anyway:
VB:
'This adds the data on the WorkSheet named DBPIT"
Private Sub cmdAdd_Click()
Dim iRow As Long
[Code].....
View 5 Replies
View Related
Mar 27, 2013
I'm trying to find a way of filling in a "form" on sheet1 and for that information to populate into the next empty row on sheet2. This would then give me a table of information in sheet2 generated from multiple entries into sheet1.
View 5 Replies
View Related
May 21, 2009
I have tabs ranging from RA to DW
Also a summary sheet. As of now i have manually copied data from each tab onto summary sheet
Is there a way to automate the summary sheet so that when i enter data in each tab it gets updated automatically in summary sheet as well
Flexibility needed is:
If row is added in any sheet from RA to DW then the same should be created in summary
IF a resource is added in any tab then the same should be added in Summary.
Similary for delete too
Overall i should be able to update summary automatically when i update the tabs.
View 14 Replies
View Related
Jun 26, 2012
I have two Excel sheets (test-excel-1.xlsx & test-excel-2.xls)The test-excel-2.xls will never be opened. When I update cells in test-excel-1.xlsx and save, I want them to automatically update to the test-excel-2.xls without having to open it. I have tried the "='[test-excel-1.xlsx]Sheet1'!$G$4" but that needs me to open test-excel-2.xlsI also want original values to be pasted in test-excel-2.xls rather than the code (this is later used in another program).
View 6 Replies
View Related
Jan 31, 2007
I have a range (J:M) that contains a conditional formatting with more than 3 conditions. It is based on a script I found on this site but the problem is that the colors don't change unless I edit the cell.
I need to edit all cells in this range at once.
How can I do that? Basically it could do a loop through all cells in the range and "F2+enter" but it seems to be a very "stupid" way to do it.
How can I update the cells in the range in a better way?
View 10 Replies
View Related
Jul 17, 2013
I have a workbook with a list of drawing numbers (with customer, date, author etc.). New drawing numbers and their associated row of information are entered onto the sheet...
..HOWEVER, multiple users can be at least viewing and potentially entering information simultaneously.
I have written code where multiple people can view the same read only file, but not edit it and it be updated.
It seems quite unlikely, but is there anyway of 'live' updating a workbook whilst multiple people are viewing it? Or at least notifying other users when the sheet has been updated?
View 2 Replies
View Related
Aug 13, 2009
if it is possible te refer to a cell in another worksheet.
I have 10 worksheets in sheet one I put in cel A4 a digit en sheet 2 I put the formula that refers to sheet 1 cel A4.
Now I want a formula that refers to sheet -1 so in sheet 3 the formula automatically refers to sheet 2 cel A4 and in sheet 4 the formula automatically refers to sheet 3 cel A4 without corrections to the formula.
View 9 Replies
View Related
Aug 4, 2006
Whilst my question is partially answered in other threads, I don't seem to be able to get enough info to piece together a complete solution for my required task.
I have a "master" workbook that contains worksheets that are simply lists to be referred to by other workbooks...
IE; one worksheet is a list of customer names, another is a list of products, etc, etc...
The idea is that I only have to update the data in one place, and all the workbooks that use this information can draw the current data from a single source...
What I require; is some VBA code to import the require worksheet from the closed "master" workbook, and hide the imported worksheet so it's not seen by the user... this action would have to replace the previous copy of the hidden worksheet...
Ideally this would happen automatically when the user workbook was opened...
View 6 Replies
View Related
May 30, 2014
Check the attached sample file
a. actual data in columns is approx 150 items (that is why i need to hide/unhide columns)
b. there are about 120 persons whom above items are issued depending on expiry of life of item i.e. issue date plus number of months mentioned in row 3. for example if coat was issued to John on 5th Jan then it's life expires on 5th May and so on.
Now what i want
1. by clicking hide checkbox only that specific column should hide or if i click Hide All check box all column in range should hide.
2. as i enter issue date expiry of that item should automatically update on corresponding month sheet i.e for above example 5th May should automatically get entered in sheet May.
I have entered sample data manually in months sheet.
aJITCBP.xlsm
View 2 Replies
View Related
Oct 10, 2013
I have multiple data sheets with tables and I want to create a master sheet table that automaticly will update when now rows/data is added in to the sheets in any of the data sheets.
Master sheet will look like this (the first 3 letters is the data sheet name), this is just the first column there a a lot more columns to be added
AAB08
AAB09
AAB10
AAB11
AAB12
[Code] .......
So when let's say in sheet AAB I add another row AAD13 I want the master sheet to update automaticly so it looks like this
AAB08
AAB09
AAB10
AAB11
AAB12
[Code] ......
Is this possible?
View 1 Replies
View Related
Mar 31, 2008
how to merge cells AFTER THE CODE BELOW.
Can anyone tell me how I merge cells without naming the cells?
Say that I want to go to cell A13 and then to the first empty cell in that column, where I want todays date.
Then I want to go 1 cell to the right, from that cell I want to merge 14 cells into one big cell in which I want some text written.
I come to the start cell by the following
View 10 Replies
View Related
Apr 14, 2014
I just started learning VBA and I can't figure out how to create a macro that will update my date range. I need it to automatically add the next date in the next blank cell so it would be like this:
1/1/13 1/2/13 1/3/13 1/4/13
Here is an outline of my work book: GANTT4-1.xlsm
Id like a date to be added if the maximum date in row 6 is exceeded by a date in column k.
View 3 Replies
View Related
Aug 21, 2013
I had a spreadsheet with an insert row macro which worked fine and dandy, unfortunatly I decided to split the worksheet across two worksheets and the macro requires updating, The macro currently runs fine for the 'To be State' worksheet but gets an error on the 'As is State' worksheet. The code breaks down on this line:
ActiveCell.EntireRow.Insert Shift:=xlDown
The only difference between the two worksheets that I need is that in the 'To be State worksheet' columns C and O need to be copied down from Row 3 while in the 'As is State' worksheet columns C and U need to be coped down from Row 3.
The worksheet names are:
As is State
To be State
My Code is:
Sub InsertARow()
Dim CurCell As Range
Set CurCell = ActiveCell
Dim CurCellInA As Range
Set CurCellInA = Columns("A").Cells(CurCell.Row)
[Code]...
View 4 Replies
View Related
May 4, 2007
if it was possible to write a macro that will update a link to a file that has the same file name but now lies in a different folder/directory path. I have about 50 spreadsheets that link to this file which has now been moved.
View 9 Replies
View Related
Oct 1, 2008
Here is my scenario:
4 step process or more?
1)I have a text file (with delimiters) that I want to be copied over to an existing workbook (because of the header)
2)So now I have a temporary workbook that includes the header and the data from the text file. I want this temporary data to be transferred or copied to a sheet in another workbook(s), wipe out previous data and store the new one. Save the workbook(s) and close.
3)Close temporary file. Don't save.
4)I want this process to be automated -- run it daily everyday at say, 6:30 in the morning.
View 9 Replies
View Related
Mar 19, 2009
I'm trying to forecast values for B48:B56. Charted the data and a polynomial 6th order fits best. Known values in B2:B47.
View 5 Replies
View Related
Apr 7, 2014
I have two workbook.In 'Entry'Workbook where data is filled up daily in different blank cells.In 'Report' workbook,exactly, I want to pull and update the data .The format is same.Then those changes if possible must be shown in a separate sheet.Since the data is very large,I cannot track where the changes has been made in 'Entry' Workbook'.In order to know the changes in cells,I require this on daily basis.Hence I require two things-
1.VBA Code/Macro for pulling & updating changes to 'Report' workbook from 'Entry'Workbook .And only those changes that should be ignored that has been made by me in 'Report'Workbook
2.Changes made in 'Entry'Workbook must be summarised in a separate sheet in 'Report'Workbook.
[URL] ....
View 1 Replies
View Related
Mar 29, 2012
I have a CSV that I have a excel macro created to do some formatting and then export the data into Access. that part works. I also have it checking for duplicate entries and skipping them. The problem that i run into is that not all my duplicates are truly duplicate, there have been updates and now i need to update Access. I have 2 fields, my primary key which is what I'm primarily matching on and then I'm checking if its been updated by checking another field "Last Changed" If this field doesn't match then I need to update the record.
At this point I'm trying to use a SQL UPDATE and I now believe that i have it formatted correct but when it gets to a record that needs to be updated I get an error: Run-time error '-2147217887 (80040e21)': The changes you requested to the table were not successful because they would create duplicate values in the index, primary key or relationship. I'm not sure what I'm doing wrong. the only other thing i could think to do would be to check each field to see if it has changed and just run the query against that but I feel like i would run into the same issue.
This is how I'm connecting to Access:
Code:
strTableName = "TableName"
strDBLocation = "xxxxuserhomexxxxxxxxxxxxDatabaseDatabase Backend.accdb"
strConnect = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & strDBLocation & ";"
Set cn = New ADODB.Connection
cn.Open strConnect
Set rs = New ADODB.Recordset
rs.Open strTableName, cn, adOpenKeyset, adLockOptimistic, adCmdTable
And this is the Query I'm using:
Code:
strSQL = "UPDATE " & strTableName & " "
strSQL = strSQL & "SET [Work Order ID] = '" & Range("B" & r).Value & "', "
strSQL = strSQL & "[JOBSTATUS] = '" & Range("C" & r).Value & "', "
strSQL = strSQL & "[SUBSTATUS] = '" & Range("D" & r).Value & "', "
strSQL = strSQL & "[Job Status] = '" & Range("E" & r).Value & "', "
strSQL = strSQL & "[STATUSDATETIME] = #" & Range("F" & r).Value & "#, "
[Code] ..........
The SQL code sits in a loop with an IF so it shouldn't execute every time and I plan on once i get this working to revisit this code and try to optimize it but that is not a priority currently.
I'm using both Excel 2007 and Access 2007 on XP.
View 7 Replies
View Related
Apr 15, 2007
I have work sheet where certain cells are updating constantly
the cells are D7, D10, D13, D16, D19, D22....... all the way down to D60
Now the values in these cells are changing every few seconds..... what I'd like to do is track the direction the cells are moving in a seperate sheet.
Lets say the cells displayed the following values for example:
D7=2.5
D10=3.4
D13=5.9
D16=8.2
D19=11.6
D22=13.8
D25=16.1
View 9 Replies
View Related
Jul 5, 2006
The question is pretty much described in the post title. Here is the situation:
I have a workbook that has data plugged into it manually throughout many sheets, and at the end there are a few sheets with different graphs and charts that are generated by a macro. This macros works perfectly - all the data is accurate and the figures are perfect when compared with a manual count. The problem I have is that the cells where the macro puts the summed values are in a chart that is supposed to create a bar graph. Normally, if I change a value that a bar graph uses I see the bar graph change - but that does not happen with the cells that have values placed in them by the macro. I also have a section that sums the values in the chart to make sure it's running right, and these values do not update automatically as well. The cells have the formula =SUM(B3:B12) and so on, in them. Right now, every time that I run the macro I need to go into the cell with the formula, hit 'enter', and then it does the summation. Is there a way to correct this problem, or is this something that is part of excel?
View 4 Replies
View Related
Jul 24, 2007
Currently I am using VBA Code below to Stop Update links prompts
Private Sub Workbook_Open()
Workbooks.Open "C:TempBook2.xls", UpdateLinks:=False
End Sub
Is there code I can use such This Workbook so that I can save this file as another name and it will work? Biz Auto Merged Post;Dear All, I have found VBA code that works.
Private Sub Workbook_Open()
Workbooks.Open ThisWorkbook.Name, UpdateLinks:=False
End Sub
View 3 Replies
View Related
Feb 20, 2008
I have the following macro which runs vlookups between two sheets in excel. Whenever i add columns to the range the vlookup column reference is not the correct cell. Is their any way I can adjust the macro so that the column number adjusts in the formula when a new column is added??
Sub template()
Range("C7").Select
ActiveCell.Formula = "=if(VLOOKUP(C6,'Project master'!B7:BG150,3, FALSE)="""", """",VLOOKUP(C6,'Project master'!B7:BG150,3, FALSE))"
'category
Range("c9").Select
ActiveCell.Formula = "=if(VLOOKUP(C6,'Project master'!B7:BG150,4, FALSE)= """", """",VLOOKUP(C6,'Project master'!B7:BG150,4, FALSE))"
'sub-category
Range("c10").Select...................
View 3 Replies
View Related