Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Terry M
 
Posts: n/a
Default How to count last number

I have numbers in columns labeled a through d. I would like to be able to
count the last digits in the numbers. Any ideas would be greatly
appreciated.

A B C D 1 2 3 4 5
6
93 86 21 83 2
1


Terry


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
macropod
 
Posts: n/a
Default How to count last number

Hi Terry,

Assuming you data start on row 2 and you have headings on row 1, with the
number 'count' headings starting in E1, try:
=SUM(IF(MOD($A2:$D2,10)=E$1,1,))
as an array formula in E2, copied down/across as far as needed.

FWIW, array formulae are input with <Ctrl-Shift-Enter, instead of just
<Enter

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I have numbers in columns labeled a through d. I would like to be able to
count the last digits in the numbers. Any ideas would be greatly
appreciated.

A B C D 1 2 3 4 5
6
93 86 21 83 2
1


Terry




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
macropod
 
Posts: n/a
Default How to count last number

Minor enhancement to disregard empty cells:
=SUM(IF((MOD($A2:$D2,10)=E$1)*($A2:$D2<""),1,))

Cheers

--
macropod
[MVP - Microsoft Word]


"macropod" wrote in message
...
Hi Terry,

Assuming you data start on row 2 and you have headings on row 1, with the
number 'count' headings starting in E1, try:
=SUM(IF(MOD($A2:$D2,10)=E$1,1,))
as an array formula in E2, copied down/across as far as needed.

FWIW, array formulae are input with <Ctrl-Shift-Enter, instead of just
<Enter

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I have numbers in columns labeled a through d. I would like to be able

to
count the last digits in the numbers. Any ideas would be greatly
appreciated.

A B C D 1 2 3 4 5
6
93 86 21 83 2
1


Terry






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tmaxx02
 
Posts: n/a
Default How to count last number

Thanks, I'll give it a try and let you know. Thanks again.
Terry
macropod wrote:
Minor enhancement to disregard empty cells:
=SUM(IF((MOD($A2:$D2,10)=E$1)*($A2:$D2<""),1,))

Cheers

--
macropod
[MVP - Microsoft Word]


"macropod" wrote in message
...
Hi Terry,

Assuming you data start on row 2 and you have headings on row 1, with the
number 'count' headings starting in E1, try:
=SUM(IF(MOD($A2:$D2,10)=E$1,1,))
as an array formula in E2, copied down/across as far as needed.

FWIW, array formulae are input with <Ctrl-Shift-Enter, instead of just
<Enter

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I have numbers in columns labeled a through d. I would like to be able

to
count the last digits in the numbers. Any ideas would be greatly
appreciated.

A B C D 1 2 3 4 5
6
93 86 21 83 2
1


Terry





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Terry M
 
Posts: n/a
Default How to count last number

It didn't work, I kept getting a value error. It seemed ok when I clicked on
the fx button to evaluate the formula, but not on the sheet.

"macropod" wrote in message
...
Minor enhancement to disregard empty cells:
=SUM(IF((MOD($A2:$D2,10)=E$1)*($A2:$D2<""),1,))

Cheers

--
macropod
[MVP - Microsoft Word]


"macropod" wrote in message
...
Hi Terry,

Assuming you data start on row 2 and you have headings on row 1, with the
number 'count' headings starting in E1, try:
=SUM(IF(MOD($A2:$D2,10)=E$1,1,))
as an array formula in E2, copied down/across as far as needed.

FWIW, array formulae are input with <Ctrl-Shift-Enter, instead of just
<Enter

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I have numbers in columns labeled a through d. I would like to be able

to
count the last digits in the numbers. Any ideas would be greatly
appreciated.

A B C D 1 2 3 4 5
6
93 86 21 83 2
1


Terry










  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Terry M
 
Posts: n/a
Default How to count last number

I found a way to do it. I took your formula and put a -- in from of the
MOD. I tried it in individual cells and it worked great, haven't tried it as
an array formula yet. Thanks, your help was greatly appreciated.

Terry

"Tmaxx02" wrote in message
ups.com...
Thanks, I'll give it a try and let you know. Thanks again.
Terry
macropod wrote:
Minor enhancement to disregard empty cells:
=SUM(IF((MOD($A2:$D2,10)=E$1)*($A2:$D2<""),1,))

Cheers

--
macropod
[MVP - Microsoft Word]


"macropod" wrote in message
...
Hi Terry,

Assuming you data start on row 2 and you have headings on row 1, with
the
number 'count' headings starting in E1, try:
=SUM(IF(MOD($A2:$D2,10)=E$1,1,))
as an array formula in E2, copied down/across as far as needed.

FWIW, array formulae are input with <Ctrl-Shift-Enter, instead of just
<Enter

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I have numbers in columns labeled a through d. I would like to be
able

to
count the last digits in the numbers. Any ideas would be greatly
appreciated.

A B C D 1 2 3 4
5
6
93 86 21 83 2
1


Terry







  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
macropod
 
Posts: n/a
Default How to count last number

Hi Terry,

Putting '--' before MOD in the formula won't make any difference - it will
return the correct result regardless.

Putting '--' before E$1 in the formula will make a difference, but only if
the 'lookup' value on row 1 has been input as text instead of as a number.

Either way, the formula won't work at all unless you input it as an array
formula.

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I found a way to do it. I took your formula and put a -- in from of the
MOD. I tried it in individual cells and it worked great, haven't tried it

as
an array formula yet. Thanks, your help was greatly appreciated.

Terry

"Tmaxx02" wrote in message
ups.com...
Thanks, I'll give it a try and let you know. Thanks again.
Terry
macropod wrote:
Minor enhancement to disregard empty cells:
=SUM(IF((MOD($A2:$D2,10)=E$1)*($A2:$D2<""),1,))

Cheers

--
macropod
[MVP - Microsoft Word]


"macropod" wrote in message
...
Hi Terry,

Assuming you data start on row 2 and you have headings on row 1, with
the
number 'count' headings starting in E1, try:
=SUM(IF(MOD($A2:$D2,10)=E$1,1,))
as an array formula in E2, copied down/across as far as needed.

FWIW, array formulae are input with <Ctrl-Shift-Enter, instead of

just
<Enter

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I have numbers in columns labeled a through d. I would like to be
able
to
count the last digits in the numbers. Any ideas would be greatly
appreciated.

A B C D 1 2 3 4
5
6
93 86 21 83 2
1


Terry









  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Terry M
 
Posts: n/a
Default How to count last number

I don't know much about it, but I modified it to work on one cell. Either
way, I got it to work the way I want it to. Thanks very much.

"macropod" wrote in message
...
Hi Terry,

Putting '--' before MOD in the formula won't make any difference - it will
return the correct result regardless.

Putting '--' before E$1 in the formula will make a difference, but only if
the 'lookup' value on row 1 has been input as text instead of as a number.

Either way, the formula won't work at all unless you input it as an array
formula.

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I found a way to do it. I took your formula and put a -- in from of the
MOD. I tried it in individual cells and it worked great, haven't tried it

as
an array formula yet. Thanks, your help was greatly appreciated.

Terry

"Tmaxx02" wrote in message
ups.com...
Thanks, I'll give it a try and let you know. Thanks again.
Terry
macropod wrote:
Minor enhancement to disregard empty cells:
=SUM(IF((MOD($A2:$D2,10)=E$1)*($A2:$D2<""),1,))

Cheers

--
macropod
[MVP - Microsoft Word]


"macropod" wrote in message
...
Hi Terry,

Assuming you data start on row 2 and you have headings on row 1,
with
the
number 'count' headings starting in E1, try:
=SUM(IF(MOD($A2:$D2,10)=E$1,1,))
as an array formula in E2, copied down/across as far as needed.

FWIW, array formulae are input with <Ctrl-Shift-Enter, instead of

just
<Enter

Cheers

--
macropod
[MVP - Microsoft Word]


"Terry M" wrote in message
...
I have numbers in columns labeled a through d. I would like to be
able
to
count the last digits in the numbers. Any ideas would be greatly
appreciated.

A B C D 1 2 3 4
5
6
93 86 21 83 2
1


Terry











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
how do I count the number of times text in column A matches text i Sheila Excel Worksheet Functions 2 November 16th 05 10:20 PM
Number count - postcodes and need to count the numbers of tim... Mark - Aust Excel Discussion (Misc queries) 1 October 24th 05 10:00 AM
How to count the number of times something occurs within a certain month Joyce Excel Worksheet Functions 2 October 18th 05 08:38 PM
Count number of times a specific number is displayed in a cell ran subs Excel Worksheet Functions 1 June 27th 05 05:01 PM
Need to Count number of occurrences and get percentage of total JennLee Excel Worksheet Functions 3 June 21st 05 09:56 PM


All times are GMT +1. The time now is 06:45 AM.

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"