I want to know about this Excel formula and how it works
IFERROR(COUNTIF(OFFSET(T_E[[#Headers],[EMPLOYEE NAME]],MATCH(I_E,L_E,0),MATCH("ACT 1 DT",L_H,0)-1,1,N_S),">0")&" / "&N_S,"")
Please tell me about this formula and how can I change this by adding or removing.
The best for trying how function works is to try it in excel, but still...
You want to know what the whole function works or just how partial functions work?
In general, the function addresses to formatted table and to named parts of the table, so it should return value from formatted table, that is x rows from employee name in row and x columns from employee name in this row.
How many depends on what is under "I_E", "L_E" and "L_H" and "N_S", I cannot tell without this knowledge.
How to evaluate a formula
If you would like to better understand how a complex formula works, use the Formula Evaluator in Excel. Therefore select the cell that contains the formula, and on the Formulas tab, in the Formula Auditing group, click Evaluate Formula.
Also there is a documentation for all formula functions. With this and the Formula Evaluator you should be able to trace what the formula does.
Related
I'm trying to conditionally format a column of cells based on whether the combination of two other columns appear in a Table.
Here is a link to the test workbook I am playing with and screenshots below for those that don't like clicking strangers links!
https://1drv.ms/x/s!Al1Kq21dFT1ij4ktFd0mzBniNX00tQ?e=L6aQm4
On the far left is an Excel table ([Table1]) that contains a list of valid combinations of [Category] and [Item]
Columns E&F contain some sample data to test against
Column G is the number of matching combinations I expect to return from a COUNTIFS() function
Column H is simply the same formula compared to 0 so I get a boolean result.
The actual formula to get the result shown in Column H is
=COUNTIFS(Table1[Category],"="&E4, Table1[Item],"="&F4)=0
All the above works as expected.
In Column J is just some literal text with conditional formatting. The condition is simply =H4, again this works as expected.
Now to the problem...
I want to avoid having the helper column (H) so I thought I could just use the same formula that I used in column H, as my condition formula.
So, I tried to use this in the conditional formatting formula dialog.
=COUNTIFS(Table1[Category],"="&E4, Table1[Item],"="&F4)=0
and with parantheses
=(COUNTIFS(Table1[Category],"="&E4, Table1[Item],"="&F4)=0)
Unfortunately, this results in the generic "There's a problem with this formula" error message.
If might be that there are some limitations with conditional formatting formulae that I'm not aware of (I'm no Excel guru, I'm a SQL developer really).
BTW: I need to stick with using a table as my real-world scenario is that there will be several tables, all populated from a database via a separate process with lengths varying from 2 or 3 entries to potentially thousands.
I would appreciate any help, even if it's just to say "You can't do this, you'll need to use your helper column..."
Thanks for looking...
I am using a SUMIFs formula in excel. One of my criteria consists of text, but the text will vary for every row I am applying this formula too. Rather than typing out that text for each column, I'd like to find a way to include in my formula the reference for where that text comes from, and have excel grab it for each row.
This picture shows what I am currently working with.
The last term in the formula is "BT-107-141-1". That is also the value of A2 in this sheet. Rather than typing "BT-107-141-1" (and doing the same thing for every row I have), can I direct excel to use whatever value is in A2 as the criteria in this formula?
I was trying to use INDIRECT, but couldn't get it to work. Something like "VALUE($A2)" might work?
Please let me know if you have any questions, I would really appreciate some help! Thanks.
Im working with a large excel questionnaire that i would like to simplify the data output for further evaluation.
What I'm trying to make is an IF statement, so that if the X is in fueloil the P coloum will write Fueloil ect..
=IF(K2="X";K1)
However when I'm trying to add another IF statement excel returns VALUE. is IF the right way to go about this or is there another way of doing this?
You don't need IF for this at all. You can use an Index/Match combo formula as demonstrated in the screenshot below. The formula in cell P2 is copied down.
=INDEX($K$1:$O$1,MATCH("x",K2:O2,0))
In words: Find the "x" in the current row and return the value from row 1 of that column.
If your regional settings require semicolons to separate parameters in formulas, please use
=INDEX($K$1:$O$1;MATCH("x";K2:O2;0))
I know how to use the indirect formula in a sheet itself.
=INDIRECT(CHAR(ROW(A5))&ROW(A5))
However, I am having hard time manipulating this to find a formula from different sheet called 'sheet1'
I am trying to retrieve value in B3 of Sheet1 using indirect formula. Any help is appreciated.
Please note, going forward (I plan to drag this formula down) I plan to manipulate rows and columns so I do want both of them (rows and columns) as variable values.
Eg: NOT indirect('Sheet1'!B3) but rather something like indirect('Sheet1!'&char(row(a5))...etc) which is not working for me.
Thanks for the help!
=INDIRECT(CHAR(ROW(A5))&ROW(A5)) just returns #REF
do not use something like CHAR() to build a "A1" address. Better use R1C1:
=INDIRECT("'Sheet1'!R3C2",0)
to make the row dragable:
=INDIRECT("'Sheet1'!R"&ROW()&"C2",0)
or to fit the columns:
=INDIRECT("'Sheet1'!R3C"&COLUMN(),0)
or for both:
=INDIRECT("'Sheet1'!R"&ROW()&"C"&COLUMN(),0)
Hello guys, I have been trying to implement the DSUM function but failed to figure it out. I looked through the previous DSUM posts on here and still don't understand. This is my problem:
on I8:L9, i have to implement the DSUM to calculate the "calculated quantity sold" for each item, ie Textbook, Novel,notepad and laptop. from A9-A16
I am supposed to use these values on B20 - B23. I don't know how to make sure i have multiple criteria for the DSUM function.
I tried this and it worked only for the first function: =DSUM(bookstore,J8,I8:I9)
This gave me the correct value only for Textbook, It summed up the quantities for textbook. What I want to do now is replicate it down so that it is the same for all the other elements.
Please help. thank you
With the setup you have then using this formula in B20 copied down will give the cumulative total of the categories
=DSUM(Bookstore,J$8,I$8:I9)
so that will give the sum for Textbook only in B20 but then in B21 it will be the sum for Textbook and Novel combined....then in B22 Textbook, Novel and Notepad (A22 should be "Notepad" to match I11)
To get the sum for the item in question only you could subtract the previous values above, i.e. use this version in B20 copied down
=DSUM(Bookstore,J$8,I$8:I9)-SUM(B$19:B19)
....but all things being equal I agree with user667489, except SUMIF is usually preferable for a single condition, i.e. in B20 copied down
=SUMIF(A$9:A$16,A20,D$9:D$16)
Is there any particular reason that you need to use DSUM to do this? You're making life very hard for yourself. You could do this much more easily via SUMPRODUCT or by using a pivot table.
When you create a column of conditions on the same variable, and you specify that as your constraint range for DSUM, excel sums over your database range where any of those conditions are true. You can't make it apply the constraint from just one row, unless that's the only row other than the column headings. So you need to put your different constraints for the same variable in different columns. This gets very messy.
Here is a sumproduct formula that will accomplish what you're trying to do, which can be copied down:
=SUMPRODUCT(($D$9:$D$16)*($A$9:$A$16=I9))
Paste that into cells J9:J12 (or B20:B23).
Another alternative having entered the DSUM formula in B20 is to select the range B20:B23 and choose Data > What If Analysis > Data Table... Column Input Cell: I9, OK. This should give the formulas below:
B20: =DSUM(bookstore,J8,I8:I9)
B21:B23: {=TABLE(,I9)}
Note: the Table formula cannot be entered from the formula bar, it is automatically generated by the Data Table command. (The same procedure could also be used to enter formulas in J9 and J10:13.)
I'd also recommend using SUMIF, or looking at PivotTables which could be used easily for this and create the list of categories for you.