Copy Formula To Another Sheet And Simultaneously Change Reference Cell?
Apr 29, 2014
I have an excel workbook that has many spreadsheets (each one sheet has a client name)I have another excel workbook that has these client names on one sheet (on a list) and next to every name I have a number (i.e total turnover of the year).
In the first workbook (where every client has his sheet (tab named after the client) I want to have a cell that equals to the sum of some cells on the other workbook, that refer to the specific client
(it looks like this ='[comissions NF 10-14.xls]comissions 14(auto)'!$J$81+'[comissions NF 10-14.xls]comissions 14(auto)'!$J$197+'[comissions NF 10-14.xls]comissions 14(auto)'!$J$313+'[comissions NF 10-14.xls]comissions 14(auto)'!$J$429)
I want this sum to be added to every sheet of this workbook. each sheet refers to a client, so $J$81, $J$197 etc must be changed for the correct cell that refers to the name of the client. The tab names are alphabetical and so s the list.
Is there any way to do it, without re-entering the formula to each one?
I am copying the entire contents of a worksheet onto a blank worksheet multiple times. The problem occurs with the charts which need updating once copied to reference the new worksheet name. I have tried stepping through each chart and then each SeriesCollection but it seems to fall over part way through.
I am using below formula to make cell link i m using below formula in column C
I want to copy this formula to range("C4:C2000"), now I want after 43 row ( in cell C47 =(=INDIRECT("V5")) change the V4 to V5 and cell C90 = (=INDIRECT("V6")) cell C133 = (=INDIRECT("V7")).......and continue till C2000,,, i mean after 43 rows it change the V4 ot v5, v6, v7, v8, v9.......
How do I change a formula cell reference based on another cell's reference? I'm building a schedule that looks to a task's trigger and adds days based on that relationship. All entries in column "A" will be text and all cells in "B" will be the simple formula "=A2" or "=A3". Due date is calculated by adding the value in "C" to the preceding date in column "D". In the spreadsheet below, the trigger for "Budget set" is "Specs written" with 3 days added to the previous due date.
________A________________B_____________C_________D 1 Task___________Trigger_____________Days_____Due Date 2 Design begins__Proj OK______________10____10-Jan 3 Specs written__Design begins (A2)____5____15-Jan (D2+C3) 4 Budget set_____Specs written (A3)____3____18-Jan (D3+C4)
If the trigger for A4, "Budget set", changed from A3 to A2, is there a way that the formula that determines the due date in D4 could read the trigger cell reference in B4 so that the value in the corresponding row in column "C" is added in the date column?
Currently I have a worksheet which is organized to have two pages on it. I will try to explain, i.e. imagine one page of the worksheet in the hypothetical range of A1:D26, then another page in the range E27:K50. So it is staggered on the same sheet. Is there an easy way to copy the range of E27:K50 onto another worksheet.
Aside from the regular copy and paste, I am having problems because there are formulas in the 2nd range (E27:K50) which loose their references once copied. i.e the formula SUM(A1:A10) I would like to be SUM('Master List'!A1:A10) on the new sheet. Is there an easier way then going through all the formulas and adding the master list part.
Is there a way to change a cell reference within a formula. ie: If the formula is =A1 (in reference to cell A1) and I wanted a new cell to have the reference =A10. Can I make a formula which was A1+9, and therefore lookup A10.
I have Excel 2007, here's what i want to do. I've got a workbook created with several worksheets in it. I want to input the name of a project in say, cell A1 on sheet1. Then on sheet2 cell C4, I want the text I input into the afore mentioned cell to show. I know how do do this with numbers (using the autosum button), but I can't figure out how to do it with text, though it's probably very simple & I'll be embarassed when I get an answer. Following is EXACTLY what I'm trying to do if the above example is confusing.
I have a Project Cost sheet and on it I input (text) a description of a building to be constructed. The cells next to it will be the associated costs of that particular building. There will be several buildings listed on the sheet. On a Sales Figures Sheet in the same workbook, I want to list those same buildings and then their corresponding sales prices. I want these descriptions to be automatically pulled from the costs sheet, so that I only have to input the sales figures.
I have two sheets in my workbook, and I am trying to reference one chart's value into the other. (attached)
I have referenced successfully by manually typing in the reference on row 2 for all values on Sheet 1: Sheet 1 - C2 needs to reference Sheet 2 - B2. (Sheet2!B2) - no problem all the way across to F2. All those values are correct b/c I manually typed in the reference.
The problem comes when I just want to drag over that same formula to increment for the other cells. It's not incrementing the formula like I need it to.
So, Sheet 1, Row 2 shows how the correct values I need to pull over but was done in a manual way. Sheet 1, Row 5 shows how it increments incorrectly when I try to just drag/copy the formula over. What I need is for Sheet 1 - D5 to reference Sheet 2 - C3, but instead if I try and drag to copy the formula instead of manually typing it in, it increments when I drag reference D2 instead of C3.
I am currently working on a data analysis project (data mining) and need to collect and later analyze statistics for the inputs which control a series of calculations. These statistics are shown in the Statistics 1, Statistics 2 and Statistics 3 cells in the workbook that I attached. The inputs are X,Y; all possible values for these inputs are listed in the N,O columns. Basically I need a macro which would take the values from these two columns and place them pair after pair into the controlling cells (K3, L3), then it would copy cells H2 through L3 (updated stats) to a new sheet after each copy operation - so that I will finally have a list of statistics for all of the input pairs.
I am trying to copy an entire row to another tab based on when a cell changes. The column where the change will come from in colum N. I am using this code based on what I have read on this board, but cannot seem to get it to work correctly.
Private Sub Worksheet_Change(ByVal Target As Range) Dim LC As Integer, iCol As Integer, Found As Range iCol = 14 'column containing K LC = Cells.Find(what:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByColumns).Column If Target.Column = iCol Then Select Case Target.Value
In the end what I would like to do is everytime there is a change in column N, the macro copies the information from that row into the other tab. I would like the information to overwrite anything that is alraedy in that tab as well. So if someone accidentally putc in a C instead of a K, it will not keep that information in the wrong tab.
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.
I can't use code for this problem as I need to give this to someone who doesn't know VBA. They will need to use it in several different reports, so I can't produce something in VBA very easily. I have three worksheets, Summary, Year1 and Year2.
I want to display either Year1 or Year2 data in the Summary sheet depending on what the user enters in a cell in the Summary sheet. For example, if the user enters "Year1" in cell E2 then I want to point to a cell in the Year1 spreadsheet. I tried using formula: =E2 & "!B3" but this doesn't work. Is there another solution? I have attached an example.
The colour of the percentage cell changes according to its percentage. I would like the S/N cells to have the same colour as the total percentage cells automatically. (Even when the percentage updates)
Secondly, for the cells under "Target", if the target dates are 1 day before today(the current date on a particular day) and the actual date is not filled, the cell fill will turn amber.
If today is on or after the target date and the actual date is not filled, the cell will turn red.
However, if the actual date is filled, the target date cell will be filled green, overwriting the above two condition.
I have a 2 columns (A and B) next to each other that is using a Sum formula and other multiplying formulas. They reference 3 cells in a different column (C) to come up up with the answer for A and B. Therefore A1 and B1 reference C1 C2 and C3 (and possibly if want to use in future column D with D1 D2 D3).
Then in A2 and B2 I want to reference from C4, C5, C6 Then in A3 and A4 I want to reference from C7, C78, C9 etc.... and so on...
Instead of retyping formulas for each row in A and B, I want to copy down, but I getting the wrong answer when I do that.
I am therefore assuming I typing the formula wrong. How do I type it correctly so the cell reference changes automatically when I pull down columns A and B?
Formula for Column A: =SUM($G28:$G30) Forumla for Column B: =($G28*$H28+$G29*$H29+$G30*$H30)/$B17
Therefore next row should be referenced from G31 to G33 and H31 to H33
But when I copy it only adjusts it for 1 reference down.
I have a set of formula in column C to H. I have set a formula as sheet1+sheet2+ like this for about 24 sheets with different reference of cells. I want to change in the entire range of cells C to H as =sum(sheet1:sheet24!b04). The reference what I have mentioned changes in different cells.
I have a file that summarizes data by country and by month but then another file with a yearly summary. I need to pull in the same cell references for each month but using each tab's name: 'Jan' tab, 'Feb' tab etc. The problem is every time I tell it to find/replace the tab name, I have to select the file from its location in a browsing box every time. I have also tried the indirect formula without much luck and because I also had to add all the month summary tabs to the original file to get the indirect formula to work. I would rather keep both files separate.
How do I copy over formulas in the Jan column and change the tab reference to the Feb tab for the Feb column without having to change things 200 times for each countries data?