Sum Costs Of Same Cell In All Sheets Of Workbook ?
Oct 29, 2008Is there a possibility to make a sum off the amount of a cell (C59 in my example) of all the sheets in the workbook ?
just like =sum(sheet1!c59,sheet2!c59) but with all sheets.
Is there a possibility to make a sum off the amount of a cell (C59 in my example) of all the sheets in the workbook ?
just like =sum(sheet1!c59,sheet2!c59) but with all sheets.
I'm dealing with Projects that have an X amount of Units used in a certain period of time. The amount of units are evenly spread among the time the project runs. The problem is that many projects start in 1 month and end in another.
To clarify, the code in my head is like this:
Total Units in project: 80
project starting on 12 jan, project ran 19 days in Jan.
Project ending on 14 feb, project ran 14 days in Feb.
Cost of a unit in Jan = 200
Ofcourse, the code needs to be smart, since the data will be filled in to a table, so the code has to change automatic every time a new project is entered. I cant use pivots 'cause of a standard format sheet.I have the costs per month in a raw data sheet. Start date and end dates in different cells next to each other.
I am trying to loop a procedure that changes a cell value on 2 sheets in a workbook. I recorded a macro on one workbook and it worked fine. I then tried to modify the macro to loop this on more workbooks that have identical worksheet names. The macro is in a workbook named LIST, which column A has a list of all the workbook names. Currently there are 55 workbooks, but in the future I am sure there will be a few more. Here is a copy of the macro:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/28/2008 by MT
'
Dim STATEstr As String
Dim a As Long
a = Range("C1")
For STATEstr = A1 To A55
Workbooks.Open Filename:="C:ALLSTATES" & STATEstr & ".XLS"
Sheets("3 ANL").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = a
Sheets("3 ANLV").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = a
ActiveWorkbook.Save
ActiveWindow.Close
Next STATEstr
End Sub
The first error I got was a TYPE MISMATCH on 'For STATEstr = A1 To A55'.
There may be more things wrong with this looping. The only experience I have with macros is recording them and then modifying and combining them.
I have a workbook containing 120 sheets. Each sheet contains a column labelled "Subject", and a row below labelled "Totals:" with a numeric value in the intersecting cell.
I need a formula that will total the value in all these cells on the last sheet.
The trouble is, the cell address of the intesecting cell fluctuates somewhat from sheet to sheet because the column and row for the "Subject" and "Totals:" are not always the same.
******** ******************** ************************************************************************>Microsoft Excel - Book1.xls___Running: 11.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutF30=
ABCDEFGHIJKLM5**Check*Date*01/05/2007*to*09/28/2007,*Job*616003*to************6**6440009,...,Job#*642010*-*HEATHER*GLEN@MONUMENT*BO************7*************8***Record#****Check#**Period***Employee*****9****Comp*Code*********Hours**10*************11*************12*************13*Totals*by*Comp*Code:*************14*Comp*Code*************15*****Hours****Wages***Overtime**Subject***Rate*16*************17*5183***PLUMBERS*UNDER*$23*************18*****19.00****376.50****376.50***11.5400*19*5187***PLUMBERS*ABOVE*$23*************20*****5.00****120.00****120.00***6.5300*21*************22**Totals:***24.00**496.50*0.00496.50**Sheet8*
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.
I want to be able to total the "Subject" wages for codes 5183 & 5187 (unfortunately, the payroll amounts are located one row below) for all 120 sheets in the workbook.
I know that the shortcut for moving the cursor to cell A1 of an active sheet within a workbook is Ctrl + Home. However, I thought there was a shortcut (using just keystrokes) to do this for all the sheets within the workbook. Is there such a shortcut?
View 1 Replies View RelatedUsing Microsoft ® Office Excel 2003 (11.8220.8221) SP3, I started with a sheet, Sheet7, that pulled the first non-blank error message found in a common cell (i.e., A7) in Sheet3.1, Sheet3.2, ... , Sheet3.15, Sheet3.16. All of these sheets resided in a single workbook, and worked correctly using the following VBA code snippet:
View 5 Replies View RelatedI am having trouble getting the selection of sheets to work. I have a workbook that has multiple sheets and one constant sheet (Summary). There is code to create new forms in this workbook and insert them after the Summary sheet. These forms all have a date input that is formatted as a date (mm/dd/yyyy), these dates get modified on the day the form is created, there may be any number of sheets created during this process. I have to print the summary sheet and only the newest forms created. I need a code to select sheets to print based on the date input of a user for each form. This is what I have so far:
VB:
Dim i As Variant
i = Range("B5").Value >= InputBox("What date to start PDF from? Format = mm/dd/yyyy")
Sheets(Array("i")).Select [code]....
If the dim can be taken out and just included in the line for the array that would be fine with me. The cell "B5" is where the date is located in each form. I want to input a date and the macro will select the sheets where the date is equal to and greater than the date entered. The Summary sheet will always be included in the print set. I have a dialog box for setting which printer to use - this file will be used at different offices and therefor the printers will be different and it will also allow to create a PDF if desired.
I have 3 columns
Column A is a list of suppliers
Column B is a list of purchase orders (there may be several purchase orders for each supplier)
Column C is a list of values
I am trying to show the top 10 suppliers in terms of value, not sure on the best way to go about it
I'm developing up a spreadsheet to conduct a feasibility on a 50 unit townhouse development and I was wondering if there was any way of allocating costs across the project without physically typing in the data in each month? (96 months in cashflow!)
ie: - In a row headed "Roads & Drains" can I allocate the say $500,000 worth of works across the months by using a formula or other methods?
My current method is very time consuming when I want to conduct a sensitivity analysis,
I am having rows of data, that i will be updating from time to time. I want excel to move the latest updated rows, in any column if updated, to move to the top, to easiy know that i updated those records. It should be that when i updated more rows than one, then the first updated cell would be in lower, in order, than the latest updated cells. I do not want any cumbersome vba. I want in formula or in conditional formatting. The row no may be total not limited to some rows.
Because, you naturally would have updated the 200 th record and would have saved. It saved as it is, so when you next opens it it is there, but how can i know that that is the last row of data i edited.
I am trying to put together a sheet to calculate item cost after shipping and taxes. To be honest I may have complicated the whole thing but what I have is two
order volumes that need to be changed to calculate the most cost effective solution.
For example: Item 1 (a1) is $40 and item 2 (a2) is $10, if I was to order 100 (a3) of (a1) and 50 (a4) of (a2), then multiply them in (a5) and (a6) to give me total
order values without taxes etc. I then have (a7) which is the shipping (a8) the import tax and (a9) the VAT.
What I am stuck on is how to work out how much a1 and a2 costs me per item, if I was to order 100 of each then I think it would be simpler by calculating
the total cost and divide by 100 then again by 25% which is the cost difference between $40 and $10. So although I may have gone around the houses on this
one, I want to be able to change cells a3 and a4 and then see how much it is costing per item after shipping and taxes.
I have a work sheet named "Main_List"...In column D starting with "D2" I would like to list worksheets that I would like to have printed via VBA.
The workbook has several hundred worksheets and I would like to list in column D only worksheets that I would like to print with VBA code.
I am having trouble calculating multiple full packages in the attached spread sheet, at the moment the formula is multiplying the number of packages by the price of one full package instead of looking for the correct price for that number of packages. 2014 rates checker formula.xlsx
View 5 Replies View RelatedPlan numbers are contained in Row 1 (1518, etc). Options are listed in Column A (L101, L102, etc). I want to add the costs of each option, resulting in the total and each option code only listed once, with that total, below each plan. Example:.......
View 2 Replies View RelatedI am going to convert different costs during life time of a product to Net Present Worth (NPW), consisting Maintenance and Rehabilitation costs (M&Rj) and Salvage Value (SV), according to the following formula: [URL] .......
SV occurs only once at the end of life time, it's NPW in Excel can be calculated as following:
=PV(i discount, AP,0, SV,1)
But M&Rj costs occurs J time during life cycle, and formulating manually their mathematical formula most times takes much time. Exactly what should I write in the cell to get their total NPW? In other words, how can I get the following formula by Excel functions: [URL] .......
Reminder: NPW= FV( 1/(1+i Discount))^n
FV: future value
i Discount: discount rate
n: numbers of years (periods)
I am trying to set up a spreadsheet to record business costs, I have a column [A] and [B] with start times and finish times respectively. [C] is the shift length say 10 hours but I always get an error if its a night shift as the start time is invariably later than the finish time. Is there a way around this without inputting the dates into the cells as I am trying to not duplicate data entry.
View 2 Replies View RelatedSee attached. (I added in some arrows for the first month so it is easier to follow the logic)
I am working with monthly revenues. Revenues are earned in a specific month but only a % is received in that month and over the next 4 months. I need a formula that will spread these revenues earned in 1 month over the next 4 months.
Currently, I have a complex Index/Match formula which works until September. September, October, November, and December do not work correctly because once the months roll over from month 12 (December) back down to month 1 (January), my formula cannot recognize the range.
Essentially, I need the formula to return the correct amount that is being paid, even across different years.
I don't know if my formula can be modified or a new formula would be more efficient.
(This post originated from Commercial Services, which I just requested be removed from that forum)
I am trying to set up an IF formula for real estate operating costs. I am guessing that this is going to work best with an IF statement.
(Sample of the spreadsheet is attached)
I know this is wrong but it expresses what I am trying to do.
=IF(C5="Gross",B10=following year of B9 with month/Day being 1/1), if not B10=the folling year of B9 with same month/day)
1Cell C5 can either be Gross or Net from a drop down list.
2Cell B9 lists 3/1/2008
3If cell C5 is gross, cell B10 should be the following year from cell B9 but with starting with 1/1/??? As the month and day(year start).
B11 would then be the following year from B10
(following month/day pattern).
4If Cell C5 is NET, cell B10 should be the following year from cell B9 using the same month and day 3/1/????
I need to change cells to reflect new costs. Then have these costs roll into new totals. I attached a worksheet to demonstrate how it works. The numbers in gray should be adjustable. The numbers in tan are summing up incorrectly with my "SUMIF" formula.
View 2 Replies View RelatedTrying to create a new workbook from another open workbook, then copying all the sheets that aren't called "Summary" to that new open workbook and then saving it. I get a subscript error on this line:
[Code]....
I want to create a hyperlink to a sheet named "adsf"
I am currently in a worksheet named: "62b Arcus"
I want the hyperlink to be set by grabbing the name from another cell.
For example, In cell h7, I have the text: adsf
In cell g7, I want to place a formula such as: =HYPERLINK("adsf!")
Except, instead of this, I want: =HYPERLINK("h7!")
In this way, i want it to hyperlink to a sheet name based on the text that is in h7.
But neither of these formulas work. Both say the following: "Cannot Open the Specified File"
After reading up on this I have discovered that I must save the file and include the file name inside the formula.
My file name is: [Maintenance Color Codes of Houses - colour coded2.xlsm] =HYPERLINK("[Maintenance Color Codes of Houses - colour coded2.xlsm]adsf!A1","LINK")
This hyperlink actually works. Yet I have a problem. What if I rename the file. For this reason, I want it to grab the current file name using "filename". I have tried this by the following:
=MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))
This grabs the current file name "Excluding the text outside of the [ and ]. I was able to create this formula myself.
How come I can't replace the part with [ and ] =HYPERLINK("[Maintenance Color Codes of Houses - colour coded2.xlsm]adsf!A1","LINK")
with:
=MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))
These two formulas together would be:
=HYPERLINK("MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))adsf!A1","LINK")
I also want to replace the "adsf" part with a cell number such as h7. So that it says h7!A1","LINK") or in full:
=HYPERLINK("MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))h7!A1","LINK")
This doesn't work either
I know that I have probably created a ridiculous formula for what I am after. I'm almost there but not quite. You may know something far, far more simple.
I am looking for a code that would copy the data from each worksheet in a given workbook and then paste to just one worksheet within a different workbook. The Sheet names are auto generated when I run this canned report but the naming structure is always the same...the first worksheet is named Repair Details and then the next sheet is named Repair Details_1, the next sheet is named Repair Details_2 and so on for every sheet in workbook. So I would like to copy all of the data(Headers to last cell) and then paste in a worksheet(ex: Master Repair Report.xlsx and the worksheet could be titled Master Repair Details) on a different workbook, then the next sheet would copy from the one under the header to the last record and paste to the same workbook. This process would repeat for every worksheet in the Repair Details Workbook and paste to Master Repair Details worksheet in the Master Repair Report workbook.
View 4 Replies View RelatedI have downloaded .csv files with my phone call costs. I want to compare phone companies, so I need to calculate the h:mm:ss amounts to $ based on flagfall and rate per 30 seconds. I can open the .csv files in Excel but I do not know anything about Excel.
View 4 Replies View RelatedI wrote a code in unshared workbook and it works fine. But when i make it shared i get Run-time error '1004' Delete method of worksheet class failed.
The Deleting of worksheet only occurs once (when the new wb is created) so is there i can unshare and share it back when the process is complete?
I have been tasked with creating a macro which creates a new workbook wherein each sheet contains the information for one site from the active sheet. The active sheet already has the values sorted by the site such that all information needing to be copied from the active sheet into the new workbook is together.
I.E.
ATL
ATL
ATL
ATL
CEN
CEN
JCK
JCK
etc.
There are 8 different sites on the active sheet: ATL, CEN, DAL, HAR, JAS, JCK, VIS, NOV
The macro needs to find the range for all of the data of each site and copy/paste that data into a new workbook such that ATL would have its own sheet, CEN would have its own sheet, and so on. The data ranges from A:R.
So, for example, the macro would find that the last row with ATL in the "B" column is 6095 and would then copy A2:R6095 and insert that data into the new workbook under Sheet 1.
I had some code that I had adapted to select the range for each of them, but the code loops through the entire sheet (which is 44,307 rows long) for each site making it a quite clunky and very slow step in an even longer macro. Since the data is already sorted, I know there must be a way to have the macro stop searching when it reaches data not equal to the data the row before, however, my experience with VBA is limited, and I have been unable to find a solution. Also, the data does not have to be conserved after being sent to the new workbook, if that would speed up the macro.
I have a spreadsheet which has all the names of trips from a warehouse, the day that they operate (1,2,3 etc) and the job line allocated to each trip. It looks something like that:
A B C
DAYTRIPCUST
I would like to create a macro that will be creating 7 new workbooks and then in those workbooks as many sheets as the trips. In these sheets, the customers should be displayed.
How do I write it? I could not find how to have a "dynamic choice" in the macro. I.e. not to have the criteria as "1", "trips1" but to choose from the range of inputs that are available.
I have a form for calculating costs of products ordered which imports quantity and descriptions from another sheet. The imported info and basic calculation of appropriate cost based on ordered quantity seems to work okay. These formulas are as follows:
First column: =IF(ORDER!A5>0, ORDER!A5, "") inserts the quantity ordered
Second Column: =IF(ORDER!A5>0, "Part Description and Part Number", "") inserts the product description
Both those formulas return a blank cell if nothing is ordered. Then using an outlying cell (G3) I enter the following formula to determine appropriate cost based on total order quantity e.g. $2.57ea if total ordered quantity is less than 50 and $2.37 if total quantity is greater than 50.. {Q: How do I put a third pricing level in here??}
=IF(SUM(A5:A27)>50,"$2.57","$2.37")................
So I can easily put together a formula that maintains a consistent markup price across varying costs. Is there a formula that will give me a consistent gross margin % as I drag down a series of costs?
So if the cost is 158 a 42% mark up would be 224.36 but the Gross Margin % is only 29.58. I want to be able to hit a 42% mark up across the board.
I am looking for a way to get a spreadsheet to automate calculations of unit costs based on variable packaging names.
I have a series of packages that are denoted by text phrases. Examples:
4/6/12
2/12/12
6/4/12
18/12
24/12
For our purposes let's say the package names above will always be in column A. Column B contains the frontline price of a case of product represented by the phrase in column A. Column C will contain the cost per unit of product - this is obtained by dividing column B by the number of each package arrangement that can be found in one case. Most of the time the number of package arrangements per case is denoted by the very first number in the package name (ie, 4/6/12 would be 4). This won't always be the case though (18/12 would be a package arrangement of 1).
I am looking for a way for the spreadsheet to do all of the following and return the results in column C: if the package name contains "4/6/12", divide column B by 4; if the package name contains "2/12/12", divide column B by 2; if the package name contains "6/4/12" divide column B by 6; if the package name contains "18/12", divide column B by 1; if the package name contains "24/12" divide column B by 24.
I am unsure where to go from here. The sheets are named with numbers 1 thru 100.
With a cell reference "D1" that selects the corresponding page, 1 - 100, I want to select it along with the other sheets in the array and copy to a new workbook.
Dim i As Integer
i = Sheets("I-CF").Range("D1").Value
WB1.Sheets(Array("I-CF", Sheets(i).Name, "Util")).Select
Sheets(Array("I-CF", Sheets(i).Name, "Util")).copy