Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Countif then multiply

A B C
1 S6 B2

I know how to use the countif function as if to count all values that equal
"S*" (value beginning with "S" only regardless of the following number) in a
row. Then tally, per row, the number of times "S*" appeared in the range.
The formula for "C1" would be: =countif(A1:B2,"S*") which right now would
return the value of 1. Now what I want to do is in addition to this formula,
I want "C1" to also calculate the countif portion and then multiply the
countif returned value by the second number in the stated cell. i.e. A1 =
S6, so "C1" has a value of "1", now mulitply the "1" by the second digit in
"A1" (which is 6). How would I go about this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Countif then multiply

Unless countif will always be 1, or if more than 1, then all cells beginning
with S will also have 6 as a second digit, your request doesn't make much
sense.

but for your specific case that works

=countif(A1:B1,"S*")*Mid(A1,2,1)

--
Regards,
Tom Ogilvy


"Gee-off" wrote in message
...
A B C
1 S6 B2

I know how to use the countif function as if to count all values that

equal
"S*" (value beginning with "S" only regardless of the following number) in

a
row. Then tally, per row, the number of times "S*" appeared in the range.
The formula for "C1" would be: =countif(A1:B2,"S*") which right now

would
return the value of 1. Now what I want to do is in addition to this

formula,
I want "C1" to also calculate the countif portion and then multiply the
countif returned value by the second number in the stated cell. i.e. A1

=
S6, so "C1" has a value of "1", now mulitply the "1" by the second digit

in
"A1" (which is 6). How would I go about this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Countif then multiply

A B C
1 S6 S4

The "S" indicated in A1 & B1 represents an group idenitifer for my Tool
Accountability system. The number following the group identifier is the
actual number of items found in that group. I guess what I really want to do
is take the values in A1 & B1 and add whatever number is entered after the
group identifier (regardless of how big the number is). In other words, I
want C1 to return a value of 10, with no S in in that returned value. Does
this make more sense?

"Tom Ogilvy" wrote:

Unless countif will always be 1, or if more than 1, then all cells beginning
with S will also have 6 as a second digit, your request doesn't make much
sense.

but for your specific case that works

=countif(A1:B1,"S*")*Mid(A1,2,1)

--
Regards,
Tom Ogilvy


"Gee-off" wrote in message
...
A B C
1 S6 B2

I know how to use the countif function as if to count all values that

equal
"S*" (value beginning with "S" only regardless of the following number) in

a
row. Then tally, per row, the number of times "S*" appeared in the range.
The formula for "C1" would be: =countif(A1:B2,"S*") which right now

would
return the value of 1. Now what I want to do is in addition to this

formula,
I want "C1" to also calculate the countif portion and then multiply the
countif returned value by the second number in the stated cell. i.e. A1

=
S6, so "C1" has a value of "1", now mulitply the "1" by the second digit

in
"A1" (which is 6). How would I go about this?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Countif then multiply

see response in worksheet.functions

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gee-off" wrote in message
...
A B C
1 S6 S4

The "S" indicated in A1 & B1 represents an group idenitifer for my Tool
Accountability system. The number following the group identifier is the
actual number of items found in that group. I guess what I really want to

do
is take the values in A1 & B1 and add whatever number is entered after the
group identifier (regardless of how big the number is). In other words, I
want C1 to return a value of 10, with no S in in that returned value.

Does
this make more sense?

"Tom Ogilvy" wrote:

Unless countif will always be 1, or if more than 1, then all cells

beginning
with S will also have 6 as a second digit, your request doesn't make

much
sense.

but for your specific case that works

=countif(A1:B1,"S*")*Mid(A1,2,1)

--
Regards,
Tom Ogilvy


"Gee-off" wrote in message
...
A B C
1 S6 B2

I know how to use the countif function as if to count all values that

equal
"S*" (value beginning with "S" only regardless of the following

number) in
a
row. Then tally, per row, the number of times "S*" appeared in the

range.
The formula for "C1" would be: =countif(A1:B2,"S*") which right

now
would
return the value of 1. Now what I want to do is in addition to this

formula,
I want "C1" to also calculate the countif portion and then multiply

the
countif returned value by the second number in the stated cell. i.e.

A1
=
S6, so "C1" has a value of "1", now mulitply the "1" by the second

digit
in
"A1" (which is 6). How would I go about this?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Countif then multiply

=Mid(A1,2)+Mid(B1,2)

--
Regards,
Tom Ogilvy


"Gee-off" wrote in message
...
A B C
1 S6 S4

The "S" indicated in A1 & B1 represents an group idenitifer for my Tool
Accountability system. The number following the group identifier is the
actual number of items found in that group. I guess what I really want to

do
is take the values in A1 & B1 and add whatever number is entered after the
group identifier (regardless of how big the number is). In other words, I
want C1 to return a value of 10, with no S in in that returned value.

Does
this make more sense?

"Tom Ogilvy" wrote:

Unless countif will always be 1, or if more than 1, then all cells

beginning
with S will also have 6 as a second digit, your request doesn't make

much
sense.

but for your specific case that works

=countif(A1:B1,"S*")*Mid(A1,2,1)

--
Regards,
Tom Ogilvy


"Gee-off" wrote in message
...
A B C
1 S6 B2

I know how to use the countif function as if to count all values that

equal
"S*" (value beginning with "S" only regardless of the following

number) in
a
row. Then tally, per row, the number of times "S*" appeared in the

range.
The formula for "C1" would be: =countif(A1:B2,"S*") which right

now
would
return the value of 1. Now what I want to do is in addition to this

formula,
I want "C1" to also calculate the countif portion and then multiply

the
countif returned value by the second number in the stated cell. i.e.

A1
=
S6, so "C1" has a value of "1", now mulitply the "1" by the second

digit
in
"A1" (which is 6). How would I go about this?






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
Multiply CountIf in one formula ant1983 Excel Worksheet Functions 3 November 30th 07 01:48 PM
look up and multiply Wibble Excel Discussion (Misc queries) 5 May 8th 07 09:08 AM
multiply, then add brenna Excel Discussion (Misc queries) 4 April 5th 07 02:14 AM
add value of 4 cells, multiply by 3 subtract 72 multiply by 80% George A. Yorks Excel Discussion (Misc queries) 10 October 25th 06 09:45 PM
Countif, then multiply?? Gee-off Excel Worksheet Functions 4 December 7th 05 08:55 PM


All times are GMT +1. The time now is 12:26 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"