+ Reply to Thread
Results 1 to 4 of 4

applying a formula to the result from a formula

  1. #1
    Registered User
    Join Date
    01-27-2013
    Location
    N.Ireland
    MS-Off Ver
    Excel 2010
    Posts
    2

    applying a formula to the result from a formula

    Apologies if this is a no-brainer but I am new to using excel!

    I have a cell which counts the number of students in a class, it does this by counting their names in a row using =COUNTIF(A2:A40,"*" ) . This then gives me the number total of students in the class - displayed in the cell containing the formula, lets say that was A1. My problem arises when I want to do a further calculation based on this result (numbers of students), - if i then create a formula in another cell - say H5*A1, the calculation always ignores the A1 cell and just shows the value of H5. I guess this is because excel doesn't see the "result" of the calculation in A1.

    Can anyone help me on how I can fix this?

    Many thanks in advance,

    Biffo

  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,939

    Re: applying a formula to the result from a formula

    Hi Biffo and welcome to the forum

    Actually all excel does see, is the result of a/any formula. This should not make a difference, but instead of using countif(), you just use a simple countA() - it counts all non-blanks cells.

    what you typical values be in A1 and H5?

    Any chance of uploading a sample workbook for me to look at (minus any sensitive info)? Its easier if we can see what you are working with, rather than try and guess what the problem might be.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: applying a formula to the result from a formula

    • Make sure cell A1 is formatted as a number
    ...Right-click on it...select: Format_cells...choose a number format...click: OK

    This formula counts the number of non-blank cells in the referenced range
    • A1: =COUNTA(A2:A240)

    • Make sure the formula you want to use is in a cell formatted as a number (see above)
    • Enter your formula in that cell....example: =A1*H5

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    01-27-2013
    Location
    N.Ireland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: applying a formula to the result from a formula

    Hi Ron and FDib,

    Thanks for your very prompt reply, I followed your guidance, changed the cells to number format and used the CountA formula and its working now!

    many thanks for your help with this!

    Cheers,

    Grant (Biffo)

+ 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