0

I am searching for a column header and return a value under it.

Example:

_|A|B|C

1|X|Y|Z

2|1|2|3

If the value is 'Y', it must return '2'. I tried =SUMIF(A1:C1,"B", A2:C2), but realized that IFSUM does not support searching horizontal.

I would appreciate your support!

1

1 Answer 1

1

It should be SUMIF not IFSUM - that works for any range, vertical or horizontal or even multiple rows/columns, as long as the value to return is numeric

=SUMIF(A1:C1,"Y",A2:C2)

AS Alan says, HLOOKUP would also give you the correct result and can return text as well as numbers

=HLOOKUP("Y",A1:C2,2,0)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.