I am trying to reference another worksheet but can not get the indirect to work.
=INDIRECT(ADDRESS((MATCH(AD10,A1:A160,0))+ROW(Page!A1)-1,COLUMN(Page!A1),4))
It is only returning the search result for the page not for the page requested.
It needs to return the data in the cell not the location.
What is wrong?
How about this:
=INDEX(Page!A:A,MATCH(AD10,A1:A160,0)+ROW(1:1)-1)
=OFFSET(INDEX(Page!A1:A160,MATCH(AD10,Page!A1:A160,0)), AE10+1, 1)
This allowed me to move the row automatically and shift the column to gather that rows information....Thanks for the help.
Related
I am trying to use Sumproduct dynamically on a sheet that will be updated regularly.
My motive is to not manually select the columns ( i.e. not to use the shift key and down key to select the range A2:A6 as seen in the attached snapshot)
I want to have the formula "=SUMPRODUCT(--(A2:A6="TX"))" pick up the A2:A6 dynamically since my data in worksheet say A is everchanging. So that when the data has grown to A8, it can be somehow picked up dynamically than manually using the keys.
Can this be done? Please let me know if my question is not clear.
Screenshot of my xls
Regards
SM
Yes, you could define the range dynamically. However, given your current formula, I see no reason why you should not switch to COUNTIF here, i.e.:
=COUNTIF(A:A,"TX")
a function for which the use of entire column referencing (A:A here) has no detriment to performance (which is not at all the case with SUMPRODUCT).
Regards
Shitty recommendations guy, here.
Can you insert a new line above all in your sheet? You could put it really wherever you want and you can even hide it, the first line just works for me.
If you can, just make it an "count.values" function on the entire column with an appropriated subtraction to adjust the count to the right length of your data. E.g. Removing this auxiliary cell value plus a header would be "=count.values(A:A)-2".
Later, on your VBA, you could retrieve this value to a variable and concatenate it to your main function. Lets say you made the auxiliary on cell A1 (coordinates 1, 1)
Dim auxLine As Integer
auxLine = cells(1, 1).value
whatever.formular1c1 = "=SUMPRODUCT(--(A2:A" & auxLine & ="TX"))"
I am trying to replace this static formula
=COUNTIFS(GPS!$J:$J,"Create Order List*",GPS!$D:$D,ScoreCard!$B16)
with something like this
=COUNTIFS(GPS!$J:$J,=CELL("contents",Task!F9),GPS!$D:$D,ScoreCard!$B16)
or
=COUNTIFS(GPS!$J:$J,=Task!F9,GPS!$D:$D,ScoreCard!$B16)
I have also tried =Text etc.
where Task!F9 is a cell where "Create Order List*" is typed in on the TASK sheet.
the 123 Derivative #CELL("contents") had no such problem doing this successfully in 123. I need the dynamic ability to have the formula manipulated via a reference to the task page. I have tried it without the = sign in front of the cell and with a + instead . Help would be appreciated.
Please try:
=COUNTIFS(GPS!$J:$J,Task!F$9&"*",GPS!$D:$D,Scorecard!$B16)
Assumes Task!F$9 contains Create Order List.
Is it possible to have a function in Excel where the second range is the current row the user is current at? For example, if column A has customer numbers then can a user have column B be the current count of rows that have the same customer number? Something like =countif(A1:Row(), Row()). So, if the user were on B14 then the function would be =countif(A1:A14, A14).
I'd rather not use VBA and I'm new to functions in Excel. My apologies if it's a simple answer. I swear that I did search for an answer before firing off this question.
The answer to your question is yes. Use INDIRECT function. Something like:
=COUNTIF(INDIRECT("A1:A"&Row()), INDIRECT("A"&Row()))
You could use something else rather than taking the current row you could have a drop-down list with all the ids. The cell remains the same but you will be able to select the number that you want from the list and use it to count.
Have a look here and tell me if you need more help:
http://www.techrepublic.com/blog/microsoft-office/how-to-add-a-drop-down-list-to-an-excel-cell/
Another approach:
=COUNTIF(OFFSET($A$1,0,0,ROW()),A:A)
Better than using the "fully" volatile OFFSET and INDIRECT set-ups is to use one with INDEX, which, in this construction, is merely volatile "at workbook open".
Also, if you are looking for a formula which can be copied to other cells such that the row referenced is always that in which the formula resides, it is much better to use a construction with ROWS rather than ROW, since the latter is affected by row insertions within the range whereas the former is not. Hence, the formula placed in row 14 would be:
=COUNTIF(A1:INDEX(A:A,ROWS($1:14)),INDEX(A:A,ROWS($1:14)))
Regards
With a column range of A1:A20 I have found the largest number with =MAX(A1:A20). How can I find the reference (e.g. A5) of the MAX() result?
I'm specifically using Google Spreadsheets but hope this is simple enough to be standard across excel and Google Spreadsheets.
=MATCH(MAX(A1:A120),A1:A120,0)
The problem is if you get more than one match: it will only give you the first one.
Either :
=ADDRESS(MATCH(MAX($A:$A),$A:$A,0),1)
if you know it's going to be in column A (1)
Or:
=CELL("address",INDEX($A:$A,MATCH(MAX($A:$A),$A:$A,0)))
And yes, it only gives you the first match
You can use something on the lines of the following
=MATCH(MAX(E7:E9),E7:E9)
This will give you the offset from the formula to the biggest number. If you use this in conjunction with ADDRESS you could get the actual cell. However, using offset should probably help you get there if you want to do something on that cell, or another number in the same row as that cell
As of now, there is a QUERY formula that can help with this situation
=ARRAYFORMULA(query({ROW(A2:A), A2:A},
"SELECT MAX(Col1)
WHERE Col2 IS NOT NULL
ORDER BY Col2 DESC"))
ROW(A2:A) represents the row number of each row which you can use the result with ADDRESS to create a reference to a cell.
As the questions states, I'm trying to reference some cells from one sheet to another. In one sheet I have the Data to populate some other cells in my Principal sheet
In short: DataSheet > Feeds > PrincipalSheet
I'm trying something like:
"=Data!$A$1"
I've even tried something like:
"=[Book1]Data!$A$1"
But still, I can't find the correct code.
I have SpreadSheetGeat 2010 and using C#
Thanks in advance for the help you provide!!
Find the answer, actually, the formula is OK, I was generating the cell ranges with some manual, over the top code, and all that I needed was to put
MySheet.Cells[add ranges here].Range.ToString();
With this code, SpreadSheet generates automatically in which range you are on in this format : "=[Book1]Data!$A$1", and is based on the range that you put in .Cells[],
For some reason Spreadsheet gear adds "[Book1]" when I try the following code. It didn't seem to work in excel.
MySheet.Cells[add ranges here].Range.ToString();
So I manually set the formula Like so:
cells[ rowIndex, 2 ].Formula = "=IFERROR('MySheet1'!$E$6,0)";