+ Reply to Thread
Results 1 to 13 of 13

Filtering Function??

  1. #1
    Registered User
    Join Date
    06-01-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    14

    Filtering Function??

    Is there a function or formula that can filter other cells? I have a sheet that has averages of different variables of data on another sheet. Now, I am having to input the averages by hand because some of the other values are “NaN.” In other words, I filter out NaN’s on certain columns and generate values that I need. Is there a way that I can write a function that can call a filter, and then do some computing? Or, is there a more logical program to use than Excel? I tried to explain this, the best I could, but if there are any questions please ask. I am having a hard time researching this on my own.

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Filtering Function??

    Can u post an exampel?
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Registered User
    Join Date
    06-01-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filtering Function??

    Quote Originally Posted by Stormseed View Post
    Can't you just do a Find/Replace (Ctrl+H) and remove the "NaN" ?

    Incase you are not aware of the steps:
    Select or highlight your data, Excel menubar --> Edit --> Replace, (or press Ctrl+H) - in the "Find What" option, type "NaN" without quotes and then leave the "Replace with" option blank and click on "Replace All".

    Or you want something else ? Could you upload your workbook for us to have a closer look ?
    I tried this, and I get a #VALUE! in my resultant cells because of the blanks.
    since its averaging, 0's would also change the results..

  4. #4
    Registered User
    Join Date
    06-01-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filtering Function??

    Quote Originally Posted by ContaminatedWitExcel View Post
    Can u post an exampel?
    how do i do this?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Filtering Function??

    Read the forum rules?
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    06-01-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filtering Function??

    Quote Originally Posted by shg View Post
    Read the forum rules?
    you asking me? i'm new to the forum. lol

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Filtering Function??

    How to add an attachment is explained in the forum rules (link in menu bar).

  8. #8
    Registered User
    Join Date
    06-01-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filtering Function??

    most of the data is classified, however I was going to make example workbook but it would be even more confusing..

    I am dealing with a large amount of data on several sheets. The data are from different tests with different conditions, so my first sheet has sums/averages of only certain values, but I am having to do the filtering and calculations by hand to put together my first sheet.

    My idea was to try and find a way to write a function in the first sheet cells that can filter what I don't want to include in the calculations, and then do the computing. Otherwise, if there is just one variable change, I have to do it all over by hand.

    I tried to explain this as simple as possible.. Any ideas would be great!

  9. #9
    Registered User
    Join Date
    06-01-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filtering Function??

    i guess, a VBA (macro) code would be best for me..
    i've never written one so i'll have to do some research

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Filtering Function??

    Are you simply asking how to write a formula to average a range of cells and ignore cells that are zero or "NaN" in value when computing the average? Excel can't do that on its own, but you can construct your own average formula that does that:

    =SUM(A1:A100)/(COUNTIF(A1:A100,">0"))

    This formula ignores text values and only "counts" the cells greater than zero when doing the division.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  11. #11
    Registered User
    Join Date
    06-01-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filtering Function??

    Quote Originally Posted by JBeaucaire View Post
    Are you simply asking how to write a formula to average a range of cells and ignore cells that are zero or "NaN" in value when computing the average? Excel can't do that on its own, but you can construct your own average formula that does that:

    =SUM(A1:A100)/(COUNTIF(A1:A100,">0"))

    This formula ignores text values and only "counts" the cells greater than zero when doing the division.
    thanks for the info!
    i am just trying to filter cells in general.. without having to do it by hand
    i.e. have a column that filters different data than another column next to it
    but have the column do this on its own..

    i guess its just a matter of writing the vba code to do this

  12. #12
    Registered User
    Join Date
    06-01-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filtering Function??

    could somebody link me a good tutorial on VBA on Excel?

+ 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