I have a workbook that currently have 20 sheets and it grows with about 3 sheets per day.
All sheets use the same formulas in columns H-L.
But sometimes I find errors in the formulas or need to ad a condition to it and then I need to update all sheets formulas with the same formula. And that is the problem.
Can I have the formula in one cell somewhere and in each column just reference to this formula so that if I change the formula in this cell it will change in all places?
In each sheet I need the formula to "fill down" about 2300 rows.
In sheet1
A1
=A1+B1
In sheet2
A1
='sheet1'!A1 // will calculate A1+B1
Anyone know of a way to do this?
If all sheets have the same structure, you can use a 3D selection to change a formula in the same cell on all sheets.
For example, if your workbook has sheets 1 to 10, select cell B1 in Sheet1, then hold down the Shift key and click Sheet10. Now all cells B1 in all sheets from Sheet1 to Sheet10 are selected, no matter what the sheet name is.
Enter a formula like =A1+A2 and hit Enter. Click any sheet and check the result. B1 will have that formula in each of the sheets.
Now go back to Sheet1, select B1, hold Shift and click Sheet10. Change the formula to =A1*A2 (multiply instead of add) and hit Enter. Copy the formula down.
Check the other sheets and see that the same formula has been applied and copied down on all other sheets.
With this technique, you can select the same cell in all sheets of the workbook and change the formula in all sheets with just one edit. Of course, it only works if all sheets in the selection have the same data structure.
Edit after comment: You could use the first sheet as the Formula Master sheet, and just need to remember that if you want to change a formula, you first have to use a 3D selection. Other than that, Excel does not offer formula replication in the way you describe. A reference to a cell will always return the cell's value, not its formula.
You could create a UDF (user defined function) in VBA for your goal:
Press Alt+F11, right click on your project in the project explorer and select Insert --> Module. Paste the code below:
Function ExecuteFormula(ByVal Target As Range)
On Error Resume Next
ExecuteFormula = Evaluate(Target.Formula)
End Function
Now you can use the ExecuteFormula() like every other function. If you want to enter the formula in your master sheet as a string "=A1+B1" just replace the 3rd line with:
ExecuteFormula = Evaluate(Target.Value)
I hope this helps.
Related
I have a Excel doc with a master log sheet that I would like to link to cells in other detailed sheets. The main sheet is called RFI Log and the other sheets are RFI001, RFI002, RFI003, etc.. Ideally on the RFI Log sheet in the Status column the formula would be =RFI_001!$A$18 and that would show the Status of RFI001. It works great. But I have over 50 RFI Sheets with a dozen fields that I want on RFI Log. Without having to type in the formula in each cell on RFI Log is there a faster way to replicate the formulas? I have tried all my cell locking tips ($) but when I drag a corner of a cell to pull down the formula the sheet name doesn't change incrementally. For example if I drag the cell =RFI_001!$A$18 the next cell turns into =RFI_001!$A$19 and not =RFI_002!$A$18.
Something like =INDIRECT"RFI_"&TEXT(SEQUENCE(18),"000")&"!A"&18-SEQUENCE(18))
INDIRECT should help you here. Usage: =INDIRECT(cellWithSheetName&"!A18")
You don't need the $ to fix column or row when dragging the formula. Just create a range of your sheet names and let the sheet name reference be adjusted when you drag the formula.
Many times when I'm creating formulas (and it seems to happen more often when they are more complex formulas) the location of the formula moves to the sheet I'm referencing. For simplicity, if I'm in A1 on Sheet1 and I type "=" then select Sheet2 and click on M13 such that the formula then reads "=Sheet2!M13, when I hit return, that formula will show up in cell A1 of Sheet2 instead of Sheet1.
I can't seem to figure out what I'm doing in those instances that creates this issue. Any help would be appreciated.
It is possible to create the behavior that you are seeing.
If you happen to hold down the Ctrl key during Sheet selection, then both Sheets 1 & 2 may become Selected (as a group).
If this is the case, then it is possible for the formula to get deposited in cell A1 in both Sheets !
I have the formula below that I'm using to link to a certain sheet and cell in my workbook that contains a graph for each entry. On the sheet I link too, each graph is about 20 cells down from the previous one. I have over a 100 graphs now and it will grow in time so I was trying to use the HYPERLINK formula rather than the Hyperlink button for this. I thought I would be able to just insert the formula in the first row, paste it in the second row with an added 20 cells, highlight the two and drag it down but it will not count in increments of 20.
Is this even possible?
=HYPERLINK("#'Trends'!A25","Click To View Trend")
I'm thinking you will have to use some type of concatenation to get the behavior you are after. To do this, you may want to employ a "helper" column. For example, put the "numbers" you are after in column B -- below you will see that I incremented it by 5.
Now your HYPERLINK formula in cell A1 is written as:
=HYPERLINK("[Book1]Sheet2!A"& B1,"Click Me for Sheet2, Cell A"&B1)
(Assuming the workbook is called Book1. Now, I can drag that formula down and it will update "dynamically" to account for the changes in column B.
I'm working in Excel 2010, and my question is how do I make a cell (say on one sheet to equal a specific value placed on another sheet). I thought the following formula would do it but it doesn't work.
=IF(COUNTIF(Name,$A2)=1,VLOOKUP($A2,Name,2,FALSE),''))
If I understand your question, you simply want one cell to represent the value of another cell from another sheet? If so, the formula will look like this: =[name of sheet]![cell reference] EG: =sheet2!A1
If used in cell A1 on sheet 1, this would put the value of cell A1 from sheet2 into A1 of sheet 1.
If you modify your question so that you reference the actual sheets & cells you're interested in, I can help you with the formula.
You can easily facilitate this by writing your formula in the bar, then when you need to reference a cell on a different sheet, simply navigate to the sheet & cell to insert it's address into the formula, then carry on with your formula if necessary.
Just hoping someone can help - I've been experimenting and googling for ages with no success!
On Excel 2010, I would like to copy a range of cells from one sheet (say, Sheet 1) to another in the same workbook. I need the copy to have the contents of the cells AND their formatting AND to mirror any changes which happen to either the contents or formatting of those cells in Sheet 1.
Is there any way I can do this please? Please note, I'm not familiar with using VBA so if that's needed I'll need some instructions about how to use/copy any code solutions you give me into my workbook too?
if you select both sheets (press CTRL while selecting sheet tabs) everything you do on sheet1 is replicated on sheet2
so select both sheets
select a cell or range of cells
format and enter content as desired
untie sheets (press CTRL while selecting sheet tabs)
sheet2 is a duplicate of sheet 1
hope that helps
To duplicate cells on Sheet 1 on Sheet 2, even when entering new rows on sheet 1
Enter ROW() in every row of column "A" in sheet one. This duplicates the row number to be used for your vlookup.
On Sheet 2 for every cell you wish to duplicate:
=IFERROR(VLOOKUP(ROW(),'Sheet 1'!$A:$G,COLUMN()+1,FALSE),"")
When entering a new row on Sheet 1, you will need to copy the ROW() function to the first column of the new row.
All other adjustments are automatic except adding columns. Adding columns requires additional steps.