PC Review


Reply
Thread Tools Rate Thread

Advanced Filter sort on "asterisk" (wild card) hides data, not just empty blank cells.

 
 
Cloudfall
Guest
Posts: n/a
 
      7th Sep 2005
In debugging a program, I isolated the problem to the following issue.
I manually created the following situation in column A, rows 1 to 6, by
copying and pasting actual data in order to accurately re-create the
problem:

ABN/ACN/BN
*

ABN/ACN/BN
3158816
40000545415/005

Excel "Help" has this to say about the asterisk:
" * (asterisk) Any number of characters in the same position as the
asterisk
For example, *east finds "Northeast" and "Southeast" "

I am assuming that the asterisk, being the wild card symbol, being the
"cell not empty" symbol, will result in the display of both the strings
under the title ABN/ACN/BN (that is, "3158816" and "40000545415/005").
But no! The string "3158816" mysteriously disappears, leaving just
"40000545415/005". The "List Range" and "Criteria Range" appear
correct.

Would anyone mind explaining to me what horrible assumption I have made
now, why on earth this is happening, and what I need to do to correct
it? And, if anyone has the time, would someone mind explaining to me
how I could have worked this out for myself and not bothered you good
people? I really am trying to be self-sufficient here. Thanking you in
anticipation.

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      7th Sep 2005
You assumed that the asterisk worked with real numbers, too. If your 3158816
were entered as text ('3158816), then you would have seen what you wanted.

If you're trying to hide the truly empty cells (not formulas that evaluate to
""), you could use a criteria of:

ABN/ACN/BN
<>



If you're trying to hide any cell that looks empty (including the formulas that
evaluate to ""), something like this should work:

I put my test data in A17
with ABN/ACN/BN in column C.

I used this criteria in G1:G2
G1 (leave empty)
G2: =LEN(C2)>0

(And filtered on A17.)

========

And experimentation is a good way to find out what happens--And google, too.


Cloudfall wrote:
>
> In debugging a program, I isolated the problem to the following issue.
> I manually created the following situation in column A, rows 1 to 6, by
> copying and pasting actual data in order to accurately re-create the
> problem:
>
> ABN/ACN/BN
> *
>
> ABN/ACN/BN
> 3158816
> 40000545415/005
>
> Excel "Help" has this to say about the asterisk:
> " * (asterisk) Any number of characters in the same position as the
> asterisk
> For example, *east finds "Northeast" and "Southeast" "
>
> I am assuming that the asterisk, being the wild card symbol, being the
> "cell not empty" symbol, will result in the display of both the strings
> under the title ABN/ACN/BN (that is, "3158816" and "40000545415/005").
> But no! The string "3158816" mysteriously disappears, leaving just
> "40000545415/005". The "List Range" and "Criteria Range" appear
> correct.
>
> Would anyone mind explaining to me what horrible assumption I have made
> now, why on earth this is happening, and what I need to do to correct
> it? And, if anyone has the time, would someone mind explaining to me
> how I could have worked this out for myself and not bothered you good
> people? I really am trying to be self-sufficient here. Thanking you in
> anticipation.


--

Dave Peterson
 
Reply With Quote
 
Debra Dalgleish
Guest
Posts: n/a
 
      7th Sep 2005
The * character works on text strings, but not numbers, so it doesn't
return 3158816. If 3158816 is entered as text, it will be returned.


Cloudfall wrote:
> In debugging a program, I isolated the problem to the following issue.
> I manually created the following situation in column A, rows 1 to 6, by
> copying and pasting actual data in order to accurately re-create the
> problem:
>
> ABN/ACN/BN
> *
>
> ABN/ACN/BN
> 3158816
> 40000545415/005
>
> Excel "Help" has this to say about the asterisk:
> " * (asterisk) Any number of characters in the same position as the
> asterisk
> For example, *east finds "Northeast" and "Southeast" "
>
> I am assuming that the asterisk, being the wild card symbol, being the
> "cell not empty" symbol, will result in the display of both the strings
> under the title ABN/ACN/BN (that is, "3158816" and "40000545415/005").
> But no! The string "3158816" mysteriously disappears, leaving just
> "40000545415/005". The "List Range" and "Criteria Range" appear
> correct.
>
> Would anyone mind explaining to me what horrible assumption I have made
> now, why on earth this is happening, and what I need to do to correct
> it? And, if anyone has the time, would someone mind explaining to me
> how I could have worked this out for myself and not bothered you good
> people? I really am trying to be self-sufficient here. Thanking you in
> anticipation.
>



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
Reply With Quote
 
Cloudfall
Guest
Posts: n/a
 
      8th Sep 2005
Thank you.

 
Reply With Quote
 
Cloudfall
Guest
Posts: n/a
 
      8th Sep 2005
Mr Peterson,

Thank you again for your help. I did experiment and I reduced your
suggestions to their minimum for purposes of demonstration and proof. I
read on another post that those who help enjoy having some feedback.
Viola.

"List Range" data is all the same and is as follows:

HeadingX
1
a
'formuala evaluated to zero-length string
'empty cell
2
b

The following hides numbers so you get the following result:

HeadingX
* 'Criterion

HeadingX
a
'formuala evaluated to zero-length string
b

The following hides the empty cell so you get the following result:

HeadingX
<> 'Criterion

HeadingX
1
a
'formuala evaluated to zero-length string
2
b

The following hides the empty cell and the cell containing the
zero-lenght string so you get the following result:

HeadingY 'note heading must be different somehow
=LEN(A6)>0 'criterion is formula in cell which displays as "TRUE"

HeadingX
1
a
2
b

For feedback, Excel Help does not tell me about about using <> for
hiding empty cells (that I could find), nor could I find anywhere else
using Google that mentions or discusses it. The above will be of use to
me if I ever forget about this issue again which is why I have
documented it to the extent I have. I'd like to make the comment that
Advanced Filter is not user friendly, and that it took me a long time
to understand what Excel Help was trying to tell me when I was trying
to learn how to use it.

Thank you again for your help.

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      8th Sep 2005
Thanks for you feedback.

And your notes will be available to any who search via google (so that's nice).

And everytime I used Advanced filter (except for unique values), I have to do
experimentation to get it close to right.

Cloudfall wrote:
>
> Mr Peterson,
>
> Thank you again for your help. I did experiment and I reduced your
> suggestions to their minimum for purposes of demonstration and proof. I
> read on another post that those who help enjoy having some feedback.
> Viola.
>
> "List Range" data is all the same and is as follows:
>
> HeadingX
> 1
> a
> 'formuala evaluated to zero-length string
> 'empty cell
> 2
> b
>
> The following hides numbers so you get the following result:
>
> HeadingX
> * 'Criterion
>
> HeadingX
> a
> 'formuala evaluated to zero-length string
> b
>
> The following hides the empty cell so you get the following result:
>
> HeadingX
> <> 'Criterion
>
> HeadingX
> 1
> a
> 'formuala evaluated to zero-length string
> 2
> b
>
> The following hides the empty cell and the cell containing the
> zero-lenght string so you get the following result:
>
> HeadingY 'note heading must be different somehow
> =LEN(A6)>0 'criterion is formula in cell which displays as "TRUE"
>
> HeadingX
> 1
> a
> 2
> b
>
> For feedback, Excel Help does not tell me about about using <> for
> hiding empty cells (that I could find), nor could I find anywhere else
> using Google that mentions or discusses it. The above will be of use to
> me if I ever forget about this issue again which is why I have
> documented it to the extent I have. I'd like to make the comment that
> Advanced Filter is not user friendly, and that it took me a long time
> to understand what Excel Help was trying to tell me when I was trying
> to learn how to use it.
>
> Thank you again for your help.


--

Dave Peterson
 
Reply With Quote
 
Cloudfall
Guest
Posts: n/a
 
      9th Sep 2005
One final point. Make sure Tools, Options, Transition, "Transition
navigation keys" checkbox is unchecked or it will not work properly.

 
Reply With Quote
 
Cloudfall
Guest
Posts: n/a
 
      9th Sep 2005
Surely after all was said and done above I might have gotten this
right, but I haven't. I have copied what is below directly from Excel:

C
FALSE 'this cell contains "=LEN($B$5)=0"

A B
1
B
2

I expected to get this result (filtering on empty cells in column B):

C
FALSE 'this cell contains "=LEN($B$5)=0"

A B
B

Instead I got this result:

C
FALSE 'this cell contains "=LEN($B$5)=0"

A B

Nothing survived the filter. Why? I've been on this for two days now.
Thank you now for any help offered.

Yours in perplexity.

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      9th Sep 2005
It's difficult to know where your data is and where your criteria range is.

I put this in B1:B5
myHeader
1
2
(blank)
=""
3

I put this in D12
(blank)
=len(b2)=0

I applied data|filter|advanced filter:
List Range: B1:B5
Criteria range: D12

And only the cells that looked empty appeared.



Cloudfall wrote:
>
> Surely after all was said and done above I might have gotten this
> right, but I haven't. I have copied what is below directly from Excel:
>
> C
> FALSE 'this cell contains "=LEN($B$5)=0"
>
> A B
> 1
> B
> 2
>
> I expected to get this result (filtering on empty cells in column B):
>
> C
> FALSE 'this cell contains "=LEN($B$5)=0"
>
> A B
> B
>
> Instead I got this result:
>
> C
> FALSE 'this cell contains "=LEN($B$5)=0"
>
> A B
>
> Nothing survived the filter. Why? I've been on this for two days now.
> Thank you now for any help offered.
>
> Yours in perplexity.


--

Dave Peterson
 
Reply With Quote
 
Cloudfall
Guest
Posts: n/a
 
      12th Sep 2005
The criteria are in B1:B2 and the List Range are in A4:B7.

OK, I know what was causing the problem. I had "LEN($B$5)=0" instead of
"LEN(B5)=0". I don't remember why I did it this way but I've changed it
and it works properly now.

Thank you for staying with me on this. I'm relatively new to VBA for
Excel. The language is cryptic and vast. A mistake leaves me
figuratively beating my head against a brick wall, not knowing what to
do.

Yours in gratitude,

Terry R.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphing with "Empty" vs "Blank" Cells WebColin Microsoft Excel Discussion 2 23rd Nov 2008 12:36 AM
How to run "advanced filter/sort" from a button? Jimbo213 Microsoft Access Forms 1 8th May 2008 12:03 AM
Excel - Autom. Filter "Empty / Non Empty cells" should come first =?Utf-8?B?Um9t?= Microsoft Excel Misc 0 10th Aug 2005 04:32 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du =?Utf-8?B?VEM=?= Microsoft Excel Worksheet Functions 1 12th May 2005 02:06 AM
Customize Current View > Filter > Advanced > Feild="Location", Condition="is not empty" =?Utf-8?B?SnVzdGlu?= Microsoft Outlook Calendar 5 24th Mar 2004 03:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:23 AM.