+ Reply to Thread
Results 1 to 7 of 7

function in which all cells with a text that is not "-" are taken into account

  1. #1
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    function in which all cells with a text that is not "-" are taken into account

    Hi,

    I have a dataset with two columns, one with textual values and one with numerical values.
    I would like to calculate the median and modus for the range that has cells that do not contain the value "-".
    I know that for calculations for cells with "-" i used the function:

    =MEDIAN(IF(Z:Z="-";AR:AR;""))


    How do i do this for the cells with text in it?

    Any input is welcome!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,421

    Re: function in which all cells with a text that is not "-" are taken into account

    Did you try this?

    =MEDIAN(IF(Z:Z<>"-";AR:AR;""))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: function in which all cells with a text that is not "-" are taken into account

    Thank you! That is a very useful function.

    The only problem that i have right now is that this function also takes the blank cells in the column into account. Is there a way to keep them out?

  4. #4
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: function in which all cells with a text that is not "-" are taken into account

    Array formula
    Please Login or Register  to view this content.
    And never use whole column for it

  5. #5
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: function in which all cells with a text that is not "-" are taken into account

    I have another question:

    I have two columns with data, one with text values and one with numerical values. I am trying to create functions that calculate the median, modus and max. for all the cells that contain a certain text. The dataset-range is dynamic and i would like to have a function that i don't have to adjust each time new data is added to the dataset.

    Is this possible?

    Any input is welcome!
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: function in which all cells with a text that is not "-" are taken into account

    I have one more question. I am trying to create a function that searches for the maximum value for the cells that have a "," (and some words) in its cell.

    If i enter =MAX(if(A:A=",";B:B;"")) it doesn't work as it did with the median.

    Is there a way to do this?
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,430

    Re: function in which all cells with a text that is not "-" are taken into account

    Try the following array entered formula*:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 09-24-2017, 11:53 AM
  2. How to use InStr function to search for a text that starts with "CTF" and ends with "."?
    By yoursamrit2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2014, 06:52 PM
  3. IF Statement that will assign account types based on "account number"
    By aladdin16 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-08-2014, 05:04 PM
  4. Replies: 11
    Last Post: 11-21-2013, 01:16 PM
  5. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  6. Managing "delegated tasks" in an Outlook "Send Only" account
    By on_way_to_fame in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 08-13-2013, 12:21 AM
  7. Replies: 9
    Last Post: 09-05-2012, 10:23 AM

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