+ Reply to Thread
Results 1 to 3 of 3

Calculate Values in a row based on value of first column

  1. #1
    Registered User
    Join Date
    05-11-2013
    Location
    Portland
    MS-Off Ver
    Excel 2007
    Posts
    9

    Calculate Values in a row based on value of first column

    Hello,

    I hope my question is an easy one.

    I have a table from A:9 to H:24. Column A contains drown down menus with various choices. Columns "B" thru "H" have the letter "L" or the letter "T" in them. I want a formula to calculate the number of cells that contain the letter "L" in a row when column A reads "NLE".

    For example...

    If A:12 = "NLE" then I want to calculate the number of cells from B:12 to H:12 that equal "L".
    If A:23 = "NLE" then I want to calculate the number of cells from B:23 to H:23 that equal "L".

    I want my formula to produce a sum of the "L"s in these rows but only if Column A in that row contains the value "NLE" from the drowndown. Is this possible with a simple formula? Or do I have to use VBA? Any help would be greatly appreciated! Thanks!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Calculate Values in a row based on value of first column

    Hi and welcome to the forum

    try something like this...
    =if(A12="NLE",countif(B12:H12,"L"),"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-11-2013
    Location
    Portland
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Calculate Values in a row based on value of first column

    Thank you FDibbins. What you are suggesting is how the formula is currently written, however, I am going to be adding four more tables and would like to repeat the formula for all four tables. I'm hoping to find a way to simplify the formula so there aren't 50 different additions in the same formula. I was hoping to find a simple formula for each table and then add the sums of each table. I can manage the second part but I wasn't sure how to simplify the formula or the single table or if this needed VBA.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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