Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Countif based of partial cell contents

II need help modifying a formula.
=COUNTIF($D$6:$D$1006,H1)
This returns the count for the value in H1 fine, but I need to modify it so
it will still return the correct number if there are spaces or characters
before or after the value in H1.

Example:
If H1 contains "BBDC3245---" or a space exists before or after " BBDC3245 "
,I want to still count all the occurrences of that base number in col D6to
D1006. I guess I need kind of a wild card search?

--
Tony S.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Countif based of partial cell contents

Try this:

H1 = BBDC3245 (no spaces)

=COUNTIF(D6:D1006,"*"&H1&"*")

--
Biff
Microsoft Excel MVP


"Tony S." wrote in message
...
II need help modifying a formula.
=COUNTIF($D$6:$D$1006,H1)
This returns the count for the value in H1 fine, but I need to modify it
so
it will still return the correct number if there are spaces or characters
before or after the value in H1.

Example:
If H1 contains "BBDC3245---" or a space exists before or after " BBDC3245
"
,I want to still count all the occurrences of that base number in col D6to
D1006. I guess I need kind of a wild card search?

--
Tony S.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Countif based of partial cell contents

That works great for no spaces. Thanks for the help.
--
Tony S.


"T. Valko" wrote:

Try this:

H1 = BBDC3245 (no spaces)

=COUNTIF(D6:D1006,"*"&H1&"*")

--
Biff
Microsoft Excel MVP


"Tony S." wrote in message
...
II need help modifying a formula.
=COUNTIF($D$6:$D$1006,H1)
This returns the count for the value in H1 fine, but I need to modify it
so
it will still return the correct number if there are spaces or characters
before or after the value in H1.

Example:
If H1 contains "BBDC3245---" or a space exists before or after " BBDC3245
"
,I want to still count all the occurrences of that base number in col D6to
D1006. I guess I need kind of a wild card search?

--
Tony S.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Countif based of partial cell contents

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Tony S." wrote in message
...
That works great for no spaces. Thanks for the help.
--
Tony S.


"T. Valko" wrote:

Try this:

H1 = BBDC3245 (no spaces)

=COUNTIF(D6:D1006,"*"&H1&"*")

--
Biff
Microsoft Excel MVP


"Tony S." wrote in message
...
II need help modifying a formula.
=COUNTIF($D$6:$D$1006,H1)
This returns the count for the value in H1 fine, but I need to modify
it
so
it will still return the correct number if there are spaces or
characters
before or after the value in H1.

Example:
If H1 contains "BBDC3245---" or a space exists before or after "
BBDC3245
"
,I want to still count all the occurrences of that base number in col
D6to
D1006. I guess I need kind of a wild card search?

--
Tony S.






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
Parse cell value based on contents Craig860 Excel Discussion (Misc queries) 7 September 24th 08 01:31 PM
sum based on PARTIAL content of another cell [email protected] Excel Worksheet Functions 4 April 6th 07 03:07 PM
sum if based on PARTIAL content of another cell [email protected] Excel Worksheet Functions 1 April 6th 07 05:19 AM
Sorting on partial Cell contents VBA EagleOne Excel Discussion (Misc queries) 2 November 21st 06 05:14 PM
COUNTIF for a partial value Jonah Excel Worksheet Functions 4 September 3rd 05 01:40 PM


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