ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Problem with a Formula (https://www.excelbanter.com/excel-worksheet-functions/178756-problem-formula.html)

sferguson

Problem with a Formula
 
I am having a problem setting up a formula for a spreadsheet. Column A of the
sheet contains several rows of names, columns B-AF are for days of the month
and contain different letters (A, T, L, E, R, B, M, N) each letter is equal
to a value of either 1, 0.5 or 3. I am trying to do a formula that will
recognize what letter is in columns B-AF for each person and add the values
of those letters to give me a total. Can anyone give me an idea of what
formula to use. Vlookup and If are not working so far. Thanks!



Ron Rosenfeld

Problem with a Formula
 
On Tue, 4 Mar 2008 12:54:01 -0800, sferguson
wrote:

I am having a problem setting up a formula for a spreadsheet. Column A of the
sheet contains several rows of names, columns B-AF are for days of the month
and contain different letters (A, T, L, E, R, B, M, N) each letter is equal
to a value of either 1, 0.5 or 3. I am trying to do a formula that will
recognize what letter is in columns B-AF for each person and add the values
of those letters to give me a total. Can anyone give me an idea of what
formula to use. Vlookup and If are not working so far. Thanks!


Something like:

=COUNTIF(B2:AF2,"A")*0.5 + COUNTIF(B2:AF2,"T") + COUNTIF(B2:AF2,"L")*3

OR

=SUMPRODUCT((RNG="T")+((RNG="A")*0.5)+((RNG="L")*3 ))

Extend as necessary

--ron

sferguson

Problem with a Formula
 
Thanks so much. I didn't even think of using countif.

"Ron Rosenfeld" wrote:

On Tue, 4 Mar 2008 12:54:01 -0800, sferguson
wrote:

I am having a problem setting up a formula for a spreadsheet. Column A of the
sheet contains several rows of names, columns B-AF are for days of the month
and contain different letters (A, T, L, E, R, B, M, N) each letter is equal
to a value of either 1, 0.5 or 3. I am trying to do a formula that will
recognize what letter is in columns B-AF for each person and add the values
of those letters to give me a total. Can anyone give me an idea of what
formula to use. Vlookup and If are not working so far. Thanks!


Something like:

=COUNTIF(B2:AF2,"A")*0.5 + COUNTIF(B2:AF2,"T") + COUNTIF(B2:AF2,"L")*3

OR

=SUMPRODUCT((RNG="T")+((RNG="A")*0.5)+((RNG="L")*3 ))

Extend as necessary

--ron


Ron Rosenfeld

Problem with a Formula
 
On Tue, 4 Mar 2008 13:32:00 -0800, sferguson
wrote:

Thanks so much. I didn't even think of using countif.



You're welcome. Glad to help. Thanks for the feedback.
--ron


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com