New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Finding Odd and Even Part Numbers

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

Finding Odd and Even Part Numbers

Postby Starbuk7 » Tue Feb 16, 2016 1:14 pm

I have cells with part numbers, I.E.
123456-1
123456-2
24W65257-3
24W65257-4
24W24989-305
24W24989-306
852741-2007
852741-2008
456DFG8-709
456DFG8-710
etc.
I need formulas to find out how many odd numbered part numbers and how many even numbered part numbers I have total in a range of 100+ cells as these numbers equate to left and right sides of an aircraft?
  • 0

Starbuk7
Rookie
 
Posts: 3
Joined: Feb 16, 2016
Reputation: 0
Excel Version: 2010

Re: Finding Odd and Even Part Numbers

Postby pecoflyer » Tue Feb 16, 2016 2:28 pm

Is the odd or even criteria based on the last digit?
If so = IF(mod(right(A1,2))=0,"even","odd") should help
  • 0

A relevant topic title helps get faster and more answers
pecoflyer
Moderator
 
Posts: 1274
Joined: Jan 24, 2012
Location: Belgium
Reputation: 39
Excel Version: 2003/2007/2010

Re: Finding Odd and Even Part Numbers

Postby Starbuk7 » Tue Feb 16, 2016 3:02 pm

Odd or Even is based on the last number of the part number.

I would like a formula for Odd numbers to tell me how many Left Hand parts are in the range and a formula for Even numbers to tell me how many Right Hand parts are in the range if that makes sense?

In the example above there are 5 left hand and 5 right hand parts, but in my spreadsheet containing 100+ parts there is not an even number of each, this is why I need formulas to count quantities of even and odd part numbers.
  • 0

Starbuk7
Rookie
 
Posts: 3
Joined: Feb 16, 2016
Reputation: 0
Excel Version: 2010

Re: Finding Odd and Even Part Numbers

Postby ConneXionLost » Tue Feb 16, 2016 6:19 pm

Give these a try.

Even Numbered items:

Code: Select all
=SUMPRODUCT(--(MOD(RIGHT(A1:A10,1),2)=0))


Odd Numbered Items:

Code: Select all
=SUMPRODUCT(--(MOD(RIGHT(A1:A10,1),2)=1))


Cheers,
  • 0

ConneXionLost
Regular
 
Posts: 68
Joined: May 9, 2013
Location: Canada
Reputation: 19
Excel Version: 2003, 2010

Re: Finding Odd and Even Part Numbers

Postby Starbuk7 » Wed Feb 17, 2016 7:59 am

That worked, Thank You!
  • 0

Starbuk7
Rookie
 
Posts: 3
Joined: Feb 16, 2016
Reputation: 0
Excel Version: 2010

Re: Finding Odd and Even Part Numbers

Postby ConneXionLost » Wed Feb 17, 2016 12:25 pm

Even simpler.

Even Numbered items:

Code: Select all
=SUMPRODUCT(--ISEVEN(RIGHT(A1:A10)))



Odd Numbered Items:

Code: Select all
=SUMPRODUCT(--ISODD(RIGHT(A1:A10)))



Cheers,
  • 0

ConneXionLost
Regular
 
Posts: 68
Joined: May 9, 2013
Location: Canada
Reputation: 19
Excel Version: 2003, 2010


Return to General Excel Questions

Who is online

Users browsing this forum: Google Feedfetcher and 141 guests

cron