+ Reply to Thread
Results 1 to 6 of 6

Ignoring everthing after a hypen

  1. #1
    Steve
    Guest

    Ignoring everthing after a hypen

    In a sumproduct formula I have a criteria that is separated by a "-".

    Example:

    20001-345
    20001-456
    20001-500

    I want to include all numbers that start with 20001 in the criteria
    regardless of anything that follows it. Do I convert it to text and
    surround 20001 in " "s?

    Thanks for any and all help!!

    Steve

  2. #2
    Biff
    Guest

    Re: Ignoring everthing after a hypen

    Hi!

    What's your formula actually doing?

    You could do both:

    LEFT(A1,5)="20001"

    OR

    LEFT(A1,5)*1=20001

    OR

    --LEFT(A1,5)=20001

    OR

    ISNUMBER(SEARCH(20001,A1))

    Biff

    "Steve" <[email protected]> wrote in message
    news:[email protected]...
    > In a sumproduct formula I have a criteria that is separated by a "-".
    >
    > Example:
    >
    > 20001-345
    > 20001-456
    > 20001-500
    >
    > I want to include all numbers that start with 20001 in the criteria
    > regardless of anything that follows it. Do I convert it to text and
    > surround 20001 in " "s?
    >
    > Thanks for any and all help!!
    >
    > Steve




  3. #3
    Steve
    Guest

    Re: Ignoring everthing after a hypen

    My formula is this...where 2155 the criteria I want to include despite the
    fact that in Column C there are multiply variations of that number such
    as:2155-145, 2155-347, etc...... sometimes (this sheet is part of 110 other
    sheets and they are filled out by various people sooooooo.... sometimes they
    put 2155.145 and sometimes they put in a space between the hyphens so there
    are many variations.... that I would like to include as long as they start
    with 2155.

    =SUMIF(C4:C40,2155,D4:D40)

    Does this info change things? I know in searching for things you can put
    *.* to do this but it doesn't seem to work here.

    Thanks a million for your help


    "Biff" wrote:

    > Hi!
    >
    > What's your formula actually doing?
    >
    > You could do both:
    >
    > LEFT(A1,5)="20001"
    >
    > OR
    >
    > LEFT(A1,5)*1=20001
    >
    > OR
    >
    > --LEFT(A1,5)=20001
    >
    > OR
    >
    > ISNUMBER(SEARCH(20001,A1))
    >
    > Biff
    >
    > "Steve" <[email protected]> wrote in message
    > news:[email protected]...
    > > In a sumproduct formula I have a criteria that is separated by a "-".
    > >
    > > Example:
    > >
    > > 20001-345
    > > 20001-456
    > > 20001-500
    > >
    > > I want to include all numbers that start with 20001 in the criteria
    > > regardless of anything that follows it. Do I convert it to text and
    > > surround 20001 in " "s?
    > >
    > > Thanks for any and all help!!
    > >
    > > Steve

    >
    >
    >


  4. #4
    Biff
    Guest

    Re: Ignoring everthing after a hypen

    Hi!

    OK, since some entries may be numeric - 2155.145, and some may be text -
    2155-145, Sumif won't work (even with wildcards), so your best choice is:

    =SUMPRODUCT(--(LEFT(C4:C40,4)="2155"),D4:D40)

    Biff

    "Steve" <[email protected]> wrote in message
    news:[email protected]...
    > My formula is this...where 2155 the criteria I want to include despite the
    > fact that in Column C there are multiply variations of that number such
    > as:2155-145, 2155-347, etc...... sometimes (this sheet is part of 110
    > other
    > sheets and they are filled out by various people sooooooo.... sometimes
    > they
    > put 2155.145 and sometimes they put in a space between the hyphens so
    > there
    > are many variations.... that I would like to include as long as they start
    > with 2155.
    >
    > =SUMIF(C4:C40,2155,D4:D40)
    >
    > Does this info change things? I know in searching for things you can put
    > *.* to do this but it doesn't seem to work here.
    >
    > Thanks a million for your help
    >
    >
    > "Biff" wrote:
    >
    >> Hi!
    >>
    >> What's your formula actually doing?
    >>
    >> You could do both:
    >>
    >> LEFT(A1,5)="20001"
    >>
    >> OR
    >>
    >> LEFT(A1,5)*1=20001
    >>
    >> OR
    >>
    >> --LEFT(A1,5)=20001
    >>
    >> OR
    >>
    >> ISNUMBER(SEARCH(20001,A1))
    >>
    >> Biff
    >>
    >> "Steve" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > In a sumproduct formula I have a criteria that is separated by a "-".
    >> >
    >> > Example:
    >> >
    >> > 20001-345
    >> > 20001-456
    >> > 20001-500
    >> >
    >> > I want to include all numbers that start with 20001 in the criteria
    >> > regardless of anything that follows it. Do I convert it to text and
    >> > surround 20001 in " "s?
    >> >
    >> > Thanks for any and all help!!
    >> >
    >> > Steve

    >>
    >>
    >>




  5. #5
    Biff
    Guest

    Re: Ignoring everthing after a hypen

    Hi!

    Another thing that you could do is "force" all users to enter data in a
    uniform style!

    Maybe setup data validation that will only accept decimal values. Data
    validation is easily "defeated", though!

    Biff

    "Biff" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi!
    >
    > OK, since some entries may be numeric - 2155.145, and some may be text -
    > 2155-145, Sumif won't work (even with wildcards), so your best choice is:
    >
    > =SUMPRODUCT(--(LEFT(C4:C40,4)="2155"),D4:D40)
    >
    > Biff
    >
    > "Steve" <[email protected]> wrote in message
    > news:[email protected]...
    >> My formula is this...where 2155 the criteria I want to include despite
    >> the
    >> fact that in Column C there are multiply variations of that number such
    >> as:2155-145, 2155-347, etc...... sometimes (this sheet is part of 110
    >> other
    >> sheets and they are filled out by various people sooooooo.... sometimes
    >> they
    >> put 2155.145 and sometimes they put in a space between the hyphens so
    >> there
    >> are many variations.... that I would like to include as long as they
    >> start
    >> with 2155.
    >>
    >> =SUMIF(C4:C40,2155,D4:D40)
    >>
    >> Does this info change things? I know in searching for things you can put
    >> *.* to do this but it doesn't seem to work here.
    >>
    >> Thanks a million for your help
    >>
    >>
    >> "Biff" wrote:
    >>
    >>> Hi!
    >>>
    >>> What's your formula actually doing?
    >>>
    >>> You could do both:
    >>>
    >>> LEFT(A1,5)="20001"
    >>>
    >>> OR
    >>>
    >>> LEFT(A1,5)*1=20001
    >>>
    >>> OR
    >>>
    >>> --LEFT(A1,5)=20001
    >>>
    >>> OR
    >>>
    >>> ISNUMBER(SEARCH(20001,A1))
    >>>
    >>> Biff
    >>>
    >>> "Steve" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> > In a sumproduct formula I have a criteria that is separated by a "-".
    >>> >
    >>> > Example:
    >>> >
    >>> > 20001-345
    >>> > 20001-456
    >>> > 20001-500
    >>> >
    >>> > I want to include all numbers that start with 20001 in the criteria
    >>> > regardless of anything that follows it. Do I convert it to text and
    >>> > surround 20001 in " "s?
    >>> >
    >>> > Thanks for any and all help!!
    >>> >
    >>> > Steve
    >>>
    >>>
    >>>

    >
    >




  6. #6
    Steve
    Guest

    Re: Ignoring everthing after a hypen

    Thanks Biff!!

    "Biff" wrote:

    > Hi!
    >
    > OK, since some entries may be numeric - 2155.145, and some may be text -
    > 2155-145, Sumif won't work (even with wildcards), so your best choice is:
    >
    > =SUMPRODUCT(--(LEFT(C4:C40,4)="2155"),D4:D40)
    >
    > Biff
    >
    > "Steve" <[email protected]> wrote in message
    > news:[email protected]...
    > > My formula is this...where 2155 the criteria I want to include despite the
    > > fact that in Column C there are multiply variations of that number such
    > > as:2155-145, 2155-347, etc...... sometimes (this sheet is part of 110
    > > other
    > > sheets and they are filled out by various people sooooooo.... sometimes
    > > they
    > > put 2155.145 and sometimes they put in a space between the hyphens so
    > > there
    > > are many variations.... that I would like to include as long as they start
    > > with 2155.
    > >
    > > =SUMIF(C4:C40,2155,D4:D40)
    > >
    > > Does this info change things? I know in searching for things you can put
    > > *.* to do this but it doesn't seem to work here.
    > >
    > > Thanks a million for your help
    > >
    > >
    > > "Biff" wrote:
    > >
    > >> Hi!
    > >>
    > >> What's your formula actually doing?
    > >>
    > >> You could do both:
    > >>
    > >> LEFT(A1,5)="20001"
    > >>
    > >> OR
    > >>
    > >> LEFT(A1,5)*1=20001
    > >>
    > >> OR
    > >>
    > >> --LEFT(A1,5)=20001
    > >>
    > >> OR
    > >>
    > >> ISNUMBER(SEARCH(20001,A1))
    > >>
    > >> Biff
    > >>
    > >> "Steve" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > In a sumproduct formula I have a criteria that is separated by a "-".
    > >> >
    > >> > Example:
    > >> >
    > >> > 20001-345
    > >> > 20001-456
    > >> > 20001-500
    > >> >
    > >> > I want to include all numbers that start with 20001 in the criteria
    > >> > regardless of anything that follows it. Do I convert it to text and
    > >> > surround 20001 in " "s?
    > >> >
    > >> > Thanks for any and all help!!
    > >> >
    > >> > Steve
    > >>
    > >>
    > >>

    >
    >
    >


+ 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