Reputation: 1739
I'm using the following formula in column
F
to get the sum of the values in column
E
: =SUMIFS(E:E,C:C,LEFT(TRIM(RIGHT([@[Object Name]],LEN([@[Object Name]])-FIND("=",[@[Object Name]]))),4),A:A,INT([@[Result Time]]))
but it doesn't seem to work.
Evaluating the formula gives me the following result:
Can someone please take a took at the for
Upvotes: 1
Views: 1920
Reputation: 3064
You are looking for an object name of "T054", when they all appear to be "CELL=T054CID"... so no results are being returned.
What exactly is it you are trying to do?
Is there any reason you cannot just do:
=SUMIFS([3G_Traffic_CS],[Object Name],[@[Object Name]],[Result Time],[@[Result Time]])
You will also notice that I am referencing just the column cells within the table, rather than the entire column. This is more efficient and will prevent any extra values which appear under the table being counted (unlikely but not impossible).
ALTERNATIVE (Using a Helper Column)
Add a helper column which contains a trimmed value of the Object Name and compare to that:
=SUMIFS([3G_Traffic_CS],[Trimmed Object Name],[@[Trimmed Object Name]],[Result Time],[@[Result Time]])
ANOTHER ALTERNATIVE (Using FIND
and SUMPRODUCT
)
If you want to include any Object Name which CONTAINS your trimmed value, you can do this using the FIND
function with SUMPRODUCT
:
=SUMPRODUCT(
([Result Time]=[@[Result Time]])*
(ISNUMBER(
FIND(LEFT(TRIM(RIGHT([@[Object Name]],LEN([@[Object Name]])-FIND("=",[@[Object Name]]))),4),
[Object Name]
)
))*
[3G_Traffic_CS]
)
YET ANOTHER ALTERNATIVE (Using a Wildcard as per @Jvdv's comment)
Again, this assumes that you want to include all Object Names which CONTAIN your trimmed site ID. Simply add a "*" to the start and end of your trimmed Object Name.
=SUMIFS([3G_Traffic_CS],
[Object Name],
CONCAT("*",
LEFT(TRIM(RIGHT([@[Object Name]],LEN([@[Object Name]])-FIND("=",[@[Object Name]]))),4),
"*"
),
[Result Time],
INT([@[Result Time]])
)
Upvotes: 3