Adapting Offset Indirect Formula?
Nov 7, 2012
Although I have seen lots of formulae to total a dynamic column, I found a brilliant formula on the Internet, as follows
HTML Code:
=SUM(OFFSET(INDIRECT("R1C",),,,ROW() -1))
The problem is I cannot work out how to adapt it to total across rows (which will expand with new columns).
View 5 Replies
ADVERTISEMENT
Feb 1, 2009
I have an income statement with the cities on top (column header) and the expenses below it. There are 5 cities for example. The last line is net profit before it changes to the next city.
New York (column header)
Wages
Lights
Net Profit
Boston
Lights
Wages
Sales
Net Profit
How do you get the row reference for Boston Net Profit without using the offset or indirect function? (doing external linking with workbook closed) The formula would find Boston first and then look for the first net profit after Boston? The small if function may work for this.
View 9 Replies
View Related
Oct 25, 2013
I roughly know what my equation should look like, but it keeps failing. Its all part of a wider spreadsheet but I will only put down that bits that impact this part of the sheet.
In my cell I need it to input a value from a different spreadsheet. The input value is text.
I currently use this formula and it works perfectly for what I need.
=(OFFSET(INDIRECT("sheet2!D"&$A7),R$6,25,1,1))
This would a return a variety of results such as "excluded","compliant","non-compliant".
I would like to arrange an IF function so that if the answer is Excluded to keep it as Excluded. But anything else to use this formula instead.
=(OFFSET(INDIRECT("sheet2!D"&$A7),(R$6-2),25,1,1))
View 3 Replies
View Related
Jan 26, 2014
I have been using a macro in Word created from pieces all over the internet (credit to a user named matt198992 for recursion script). The code prompts a user for folder, then runs a macro called Publish as PDF to all word files in the folders/subfolders.
I want to adapt the code in Excel, but I am having trouble. Error on the line "Workbooks.Open Filename:="Path & DirN".
[Code].....
View 10 Replies
View Related
Feb 14, 2008
Is it possible to display a name on a chart that is not the X or Y value?
I've been sent this macro which displays the school name on a chart when the mouse is on the data point - its all well and good but on the graph I am working on, the X and Y value are both values and I want the school name to come up as well.
Private Sub Chart_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)
'macro that gets chart to show user details of a point on the chart when the mouse is moved over it
Dim ElementID As Long, Arg1 As Long, Arg2 As Long
Dim myX, myY As Variant
With ActiveChart
.GetChartElement x, y, ElementID, Arg1, Arg2
If ElementID = xlSeries Then 'checks to see which part of the chart the mouse is over
View 9 Replies
View Related
Aug 19, 2009
The solution to a challenge here does almost exactly what I need except it doesn't manage partial matches.
Function MatchColors(strValue As String, rngList As Range) As String
Dim regEx, Matches, i, strResult, bFlag
'Create and set the parameters for the regular expressions object
Set regEx = CreateObject("vbscript.regexp")
regEx.Global = True
regEx.IgnoreCase = True
View 9 Replies
View Related
Apr 21, 2013
I've recorded this Macro to sort the cells in a column alphabetically if any cells have content.
I would like to use the Macro on the whole workbook however the AB column range varies between the worksheets.
How should I adapt this Macro to sort simply to the END of AB column??
' PWRII Macro
'
'
Cells.Select
[Code]....
View 5 Replies
View Related
Mar 15, 2009
I'm in the process of combining a lot of worksheets into one and found the code on the following site:
[url]
which almost does what I need. I understand how it works (i think!) but as a vba novice I can't work out how to adapt the code to copy more than one range from the source workbooks.
What I want to be able to do is copy say the following cells from each workbook:
A1
D1
d4:D7
I think what I need to do is call the getdata macro multiple times with different ranges, but I can't quite work out how to do that without simply creating multiple copies of the master file.
View 9 Replies
View Related
Aug 18, 2009
I am trying to develop an Indirect Indirect Validation drop down list. Example, Building - Floor - Room, i.e. Select Building from a Validation drop down list. Then based upon the Building selected, select only the Floors applicable to the Building Selected. I am able to achieve this via an Indirect Validation drop down. However, when I attempt to then select the Rooms applicable to the Floor of the Building I selected, I can not produce an Indirect Validation off a previous Indirect Validation.
In the attachment, I have used Plant - Location - Room. I have name ranged the selections, and have used Validations Lists for Plant, and Indirect Validations for Location. The error occurs where I attempt to do an Indirect Validation for Room.
View 3 Replies
View Related
Aug 20, 2009
How can I copy down an indirect formula? When I copy it the lookup reference doesn't change. My formula is: =IF(INDIRECT("Q1")="",INDIRECT("R1"),INDIRECT("Q1"))
but when I copy down the cell reference stays the same (I need to keep the indirect formula because I'm adding columns in column Q but it needs to reference column Q even when columns are added). From reading through some other posts I believe I need to add a ROW() or COLUMN() formula in there somewhere.
View 5 Replies
View Related
Jul 15, 2013
I am trying to sum the same data across several tabs but I am using information in the column and row headers to find it. For some reason this formula wont work and I can't figure out what I'm doing wrong.
=SUMPRODUCT(N(INDIRECT(""&Sheets&"!"&ADDRESS(MATCH($A$12,$A:$A,0),MATCH($G$3,3:3,0)),FALSE)))
I'm getting #REF! and when I step through it, it fails when it reaches the Indirect statement.
View 9 Replies
View Related
Aug 27, 2007
getting an array formula to work with my indirects....
View 9 Replies
View Related
Sep 18, 2007
When I try to copy this formula down, it stays the same and won't reference the cells.
=INDIRECT("PO_Order_Form!B5")
View 9 Replies
View Related
Sep 24, 2008
rate2008
rate2007
...
And I want to show this data in a table, where I have the years 2008, 2007, ... in cells A1:A10 and the formulas =INDIRECT("rate"&A1), =INDIRECT("rate"&A2), ... in cells B1:B10.
For some reason, I am getting nothing but #VALUE! errors in my indirect formulas. In fact, even if I take out the indirect and just have ="rate"&A1, ="rate"&A2, etc., I still get the errors. It seems like the problem is with the & operator. This only seems to be a problem in this certain workbook; I am able to get the desired results if I open a new workbook.
View 9 Replies
View Related
Jul 25, 2006
when using the following forula as below; =INDIRECT(INDEX($B$37:$B$62,$B$3)&"!"&ADDRESS(ROW(D6),COLUMN(D6))). centain cells come up with #REF! and or #VALUE!
View 6 Replies
View Related
Oct 26, 2006
I need to create a formula for a series of ranges that have a variable sheet name (which is located on sheet Backend!E15) and when it creates the formula will reference the exact same cell on the variable sheet.
this is what i have so far...
Option Explicit
Sub formulaset()
Dim Cell As Range
Dim target As String
For Each Cell In Range("b4:al132")
Application. ScreenUpdating = False
target = Cell.Address
Cell.FormulaR1C1 = "=INDIRECT(CONCATENATE(BackEnd!E15,""!"",target))"
Application.ScreenUpdating = True
Next Cell
End Sub
but this is the answer I am getting in the first cell of the range...
=INDIRECT(CONCATENATE(BackEnd! 'E15',"!",target))
as you can see I am having trouble getting the target address to lock in. To make things worse, its needs to be in " " so the concatenate creates the corect address link.
View 5 Replies
View Related
Feb 14, 2007
I have tried to apply '= SUM(INDIRECT("A2:A10"))' formula to do the SUM at cell A11. But, if I add two more Rows, then my formula moves down to cell A13 but numbers in Cell A11 and A12 does not get added to the total. How can I avoid that? I have reserached this site extensively and could not find an archived solution.
View 6 Replies
View Related
Mar 5, 2009
I have a sheet which needs to look up one reference and then fill a table with the rest of them.
EG:
Cell A1 contains '0091 911'!$E$2 (cell E2 contains value 100)
Cell A2 contains =indirect(A1) and displays value 100
I need a formula which will auto fill the remaining cells in the table.
eg:
Cell A3 fills to contain '0091 911'!$E$3 (row +1)
Cell B2 fills to contain '0091 911'!$F$2 (column +1)
so it needs to fill the Indirect reference and not =indirect(A1),=indirect(A2)....
View 14 Replies
View Related
May 22, 2009
I have made a file that works perfectly in excel 2007, but when I send it to a client it doesn't work as they have 2003.
View 12 Replies
View Related
Jul 12, 2006
I have a set of data as attached where the productivity of each staff is recorded on a daily basis.However, the cell in which their name is located on each tab of the day of the month might not be the same. I am thankful that the forum actually provided me with the formula located in cell c15.
1)However, I would appreciate if someone could translate what the formula means as I am not so sure what the formula represents.
2)The reason is I would like to calculate how many training days (TR), Medical Leave(ML) and Emergency Leave(EL) for the month of January for each staff.I tried modifying the formula but it didnt work.
3) Is it possible to use a vlookup function for this solution?
View 9 Replies
View Related
Mar 31, 2007
I'm in the middle of making a yahtzee game in excel. Does anyone know if it is possible to use the indirect function in the formula of a picture. I have embedded 6 bitmap images of dice on sheet 2 (worksheet name: "Dice Images"). I took a picture of one of those dice and pasted that picture on sheet1. The formula in the picture is: ='Dice Images'!$A$1
This means that it is refering to cell A1 of the "Dice Images" worksheet of which contains the pasted bitmap of the dice image. I was wondering if I could use the INDIRECT function instead of the formula above but the following returns an error:
=INDIRET("'Dice Images'!$A$2",true). It returns the following error: "The text you entered is not a valid reference or defined name". It doesn't seem to like the INDIRECT function for some reason, unless I am doing something wrong.
View 3 Replies
View Related
Jan 10, 2008
I have a formula: ='Jan 7-11'!D10. I want to replace the tab name 'Jan 7-11' to change based on the content of F6 (which is a data validation for all tabs in my workbook).
View 3 Replies
View Related
Feb 13, 2008
I am using VB in Excel to write a formula for summing a column of numbers that will vary in length. I have been using the Indirect formula and have the start and end cells of the range identified in another location. My problem is, the macro in vb is sending the Indirect formula to the cells containing the start and end points by using relative functions ie. go across 30 columns and up 10 rows to get start cell. I wanted it to just save the cell location of the start and end points.
EG.
VB formula is: "= SUM(INDIRECT(R[-23]C[27]&R3C29):INDIRECT(R[-23]C[27]&R3C30))"
whereas I just want it to read "=Sum(Indirect(C4&D5):INDIRECT(C4&D6))"
where cell C4 gives the column letter and D5 the row number of the start of the range and C4 and D6 give the column letter and row number of the end of the range.
View 9 Replies
View Related
Dec 4, 2013
Okay so I'm trying to us the SUMIFS formula to add values on a different sheet based on criteria on that sheet but I want to use a text string on the sheet with the SUMIFS formula to reference the sheet with the data on it.
My original formula was:
=SUMIFS(INDIRECT("'"&A2&"'!K4:K500"),INDIRECT("'"&$A$2&"'!B4:B500"),"=LEFT(AA1,2)",LEFT(INDIRECT("'"&$A$2&"'!C4:C500"),3),"=MID(AA1,7,3)")
However I kept getting an error and excel said that INDIRECT("'"&A2&"'!K4:K500") was volatile, so I tried to replace it with INDEX and my formula was:
=SUMIFS(INDEX(A2:A2,1)&"'!K4:K500",INDEX(A2:A2,1)&"'!B4:B500",LEFT(AA1,2),LEFT(INDEX(A2:A2,1)&"'!C5:C500",3),MID(AA1,7,3))
However INDEX(A2:A2,1)&"'!K4:K500" returns the value "1251062 EP.EL+CB-A10'!K4:K500" which wont calculate properly because of the quotation marks but excel is auto inserting them.
View 3 Replies
View Related
Jun 9, 2009
I have this formula in excel 2007:
=COUNTIFS(Blad1!W:W;"1";Blad1!X:X;"H")+COUNTIFS(Blad1!W:W;"6";Blad1!X:X;"H").
Blad is Dutch for sheet, by the way.
In this formula, I want to let the ranges in Sheet1 be dependent of values in Sheet2. The formula itself is in Sheet2.
W must be replaced by the value of Sheet2!B12 and X to be replaced by the value of Sheet2!B9.
I tried this by using the INDIRECT formula, but the quotation marks of the search values are giving errors.
View 6 Replies
View Related
Oct 11, 2011
I need making a dynamic cell reference in an indirect formula, which looks at a different workbook.
The other workbook is called: ESF.xlsx
The sheet name in the other workbook is defined in Cell B2
The first cell i need to pull across is B115.
In cell B8, This is what i have so far:
=INDIRECT("[ESF.xlsx]"&B2&"!"&"B115")
How do i make it so that i can copy this formula quickly, but so only the row and column reference change?
Like in C8 i would want it to look at cell C115, In C9, id want it to look at C116 etc.
View 2 Replies
View Related
Dec 9, 2012
I have been using the following formula to do conditional summing over multiple worksheets:
=SUMPRODUCT(SUMIF(INDIRECT("'"&$AB$2:$AB$13&"'!b3:b39"),$B16,INDIRECT("'"&$AB$2:$AB$13&"'!c3:c39")))
The formula works fine, but when I drag it to the next column c3:c39 stays the same. How do I get that reference to change when I drag the formula over multiple columns.
View 1 Replies
View Related
Feb 27, 2014
The following formula is all on one line. I want to do indirect for file name and tab in all instances it shows up. (I want to have the filename in one cell and sheet/tab name in another cell to reference the indirect to.)
How would I use indirect in the formula to reference the cells?
=INDEX('[Feb 2014.xlsm]TRADEDB'!$A$75:$Q$131,
SMALL(IF(('[Feb 2014.xlsm]TRADEDB'!$A$75:$A$131=$H$8)*('[Feb 2014.xlsm]TRADEDB'!$G$75:$G$131=$I$8),
ROW('[Feb 2014.xlsm]TRADEDB'!$A$75:$Q$131)),ROW('[Feb 2014.xlsm]TRADEDB'!2:2))-74,1)
View 5 Replies
View Related
Jul 7, 2014
I am trying to use the indirect formula to pull in data from a cell in a different worksheet using the tab name as my reference. For example:
I have my tab name in cell A2, then I am using this formula to pull the information from cell g29 on the tab listed in A2, but its not working:
=INDIRECT(A2&”!”&”g29″)
Also, my tab name in cell a2 is a date, does that make any difference? I've tried a couple variations on the indirect formula and have gone from the #REF! error to the #NAME? error.
View 2 Replies
View Related
Sep 28, 2006
I want to create a formula of the form: =INDIRECT(ADDRESS(4,2,2,TRUE,($A9) and insert this in a cell BUT the $A9 reference needs to reference the row of the cell where the formula is being inserted which will vary. ie. A30, A31, etc. How do I do this?
View 2 Replies
View Related