is there any way to reference in this formula =SUM(Sales[Jan]), using as a value between brackets a cell value?
What I am trying to achieve is giving this formula =SUM(Sales[a1]) where the value of the cell A1 = Jan.
I would like to do something similar in the flooring formula
index(Sales;SECUENCE(ROWS(SALES));{1\3\5})
And I would like to do something like:
index(Sales;SECUENCE(ROWS(SALES));{A1})
where A1 value = 1/3/5
You need INDIRECT() function.
=SUM(INDIRECT("Table1["&A1&"]"))
Alternatively you can use SUMPRODUCT() like
=SUMPRODUCT(Table1*(--(Table1[#Headers]=A1)))
Related
I am trying to write a function in excel that references a range from specific cell in a column, in this example A22 or B22 to the last cell in that column. Something like this:
=MAX(IF('Sheet1'!$A$22:$A$LAST="YES",'Sheet1'!$B$22:$B$LAST))
How do I accomplish this?
Or........
=LOOKUP(1,0/(A:A="YES"),B:B)
Replace the end reference with INDEX MATCH
=MAX(IF('Sheet1'!$A$22:INDEX('Sheet1'!$A:$A,MATCH(1E+99,'Sheet1'!$B:$B))="YES",'Sheet1'!$B$22:INDEX('Sheet1'!$B:$B,MATCH(1E+99,'Sheet1'!$B:$B))))
Remember to confirm with Ctrl-Shift-Enter.
I have the following as target:
In another workbook, I have as a data source this table:
So, using VLOOKUP formula I'm retrieving the values that I want for the cell just with formulas like that:
=CONSULTAV("user1";login.xlsx!Tabla1[#Datos];2;FALSO
CONSULTAV is the spanish formula for VLOOKUP, so I guess in english (just for better understanding as this is a english website) should be something like:
=VLOOKUP("user1";login.xlsx!Table1[#Data];2;FALSE
I want to type in the cell a simpler formula , something like:
=FindValue("user1")
So that formula calls the VLOOKUP formula and just uses the value as first argument for the VLOOKUP formula for searching the value.
Assuming the following data layout,
Select B3 and then create a defined name with the following parameters,
That formula is,
=VLOOKUP("password"&RIGHT(Sheet4!B2, 1), Table1[#All], 2, FALSE)
Now use =FindPassword in B3.
This method will always find the password associated with the user in the cell directly above it.
I need to use SUMIFS function in Excel 2007, currently my formula looks like this:
=SUMIFS(D:D,B:B,"=string",c:c,"=E")
Now the value of string is placed inside cell A3 of sheet1.
Is there any way through which i can refer that value in SUMIFS formula like sheet1!$A$3
I try following code but it didn't work:
=SUMIFS(D:D,B:B,"=sheet1!$A$3",c:c,"=E")
why don't you directly reference that cell without quotes? such as:
=SUMIFS(D:D,B:B,sheet1!$A$3,c:c,"=E")
I have a simple question:
How do I reference a row combined with a column or vice versa?
e.g.
I have a table like this:
|A|B|C|D|
1 |1|0|1|
2 |4|4|2|
3 |7|2|3|
4 |5|7|2|
5 |3|9|1|
To reference A1, how do I reference it using the Row() function
I want the column to remain a constant but the row be varaible according to which row I am on.
If I am on D5, for instance, I want something like: =SUM(ARow(), CRow()) which is equivalent to =SUM(A5, C5) which returns 4.
Thanks.
... Sorry For the previous answer, given you want to change row but keep column constant, you could use the $ reference in the formula.
For example, if your formula in D5 was:
= Sum($A5, $C5)
That would keep the column constant and the row would change.
Similarly, $A$5 would force the formula to ALWAYS use A5 and A$5 would force the formula to always use row 5, but change the column.
Hope this helps :)
the ROW() and COLUMN() function reference rows and columns, not single cells...
You might be helped with the ADDRESS() function, where you can use row and column numbers as parameters.
And to the basics to reference a column-row combination without explaining further on the logic of your function you could simply use the cell address itself:
D5 : =SUM(A5, C5)
In excel, say I am trying to find average of 5 cells, I can put a formula
=Average(C1:C5)
I would like to modify the formula such that
= Average(C1:CXXXX)
where XXXX comes from another cell.
Is there a way to achieve this?
You probably want to have a look at the INDIRECT function if you need it as a fomula in a cell - you can use it like this, assuming that D1 contains the row that you call XXXX in your question:
=AVERAGE(INDIRECT("C1:C"&D1))
If this is in vba, then you can use:
= Average(Range(Range("C1"),Range("C") & XXXX))
where XXXX is the row number, assuming that Average is a function that you have defined somewhere.
Use the INDIRECT function. Indirect returns the reference by a string. INDIRECT("A1") returns the cell A1.
Your values are in the C column. Let's say that the XXXX is in cell D1. The formula becomes
=AVERAGE(C1:INDIRECT("C" & D1)).