Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steve
 
Posts: n/a
Default 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   Report Post  
Biff
 
Posts: n/a
Default

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" wrote in message
...
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   Report Post  
Steve
 
Posts: n/a
Default

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" wrote in message
...
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   Report Post  
Biff
 
Posts: n/a
Default

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" wrote in message
...
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" wrote in message
...
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   Report Post  
Biff
 
Posts: n/a
Default

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" wrote in message
...
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" wrote in message
...
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" wrote in message
...
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   Report Post  
Steve
 
Posts: n/a
Default

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" wrote in message
...
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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculating the minimum value ignoring o jo jo Excel Worksheet Functions 1 June 29th 05 11:36 PM
Sort ignoring negatives and positives bangbanjo Excel Worksheet Functions 3 June 8th 05 12:21 AM
Ignoring Lines with Errors in Pivot Tables Darren Excel Worksheet Functions 3 March 22nd 05 09:13 PM
Averaging noncontiguous numbers ignoring zeros? Mike Excel Worksheet Functions 19 March 4th 05 02:05 AM
Averaging, ignoring zeros Mark Excel Worksheet Functions 5 February 28th 05 10:25 PM


All times are GMT +1. The time now is 09:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"