+ Reply to Thread
Results 1 to 2 of 2

Count and Multiply

  1. #1
    Registered User
    Join Date
    08-08-2007
    Posts
    1

    Count and Multiply

    I am trying to create or revise the formula that allows me to count the number of times a letter is entered in a single cell over the worksheet.

    The letters G,I,R,S, and N stand for a specific activities I do in my job over a period of one week. Each time a letter is entered on the worksheet - in cells C7 through K 39 (one letter per cell), it represents a time frame of 20 minutes for that activity. In another location on the worksheet, a total count for each letter is displayed in hours.

    For example, if the letter G appears 3 times in cells C7 through K39, a count of 1 hour would be displayed for "G".

    I am using the following formula to do this calculation and it appears to be working correctly. =COUNTIF(C7:K39,"G")*0.2/0.6


    The problem is that I now need to revise or rewrite the formula to include the following additional calculations:

    Cells C40 through K40 will now contain letters G,I,R,S,N and a multiplier.

    For example, 6G would be entered and equals 6 times 20 minutes – for a total of 2 hours. This letter and multiplier combination only occurs in row 40 and both the multiplier and the letter must be contained in the same cell. If any entry is made in cells C40 through K40, the resulting total needs to be combined with the data collected from C7 through K39 and displayed as a cumulative hourly amount for each letter.

    How do I revise - or rewrite - the formula =COUNTIF(C7:K39,"G")*0.2/0.6 to take into account the additional calculations from cells C40 through K40?

    My knowledge of Excel is limited....

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try

    =(SUMPRODUCT(--(RIGHT(C40:K40)="G"),(0&LEFT(C40:K40))+0)+COUNTIF(C7:K39,"G"))/3

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1