AVForums

Our philosophy in our forums, reviews, podcasts and feature videos is to promote audio and visual excellence by gathering and sharing the best information and resources available.

Help

To begin please visit our help section »

Not a Member Yet?

It only takes a minute to start enjoying the benefits of AVForums membership, and it's free!

Member Log in

Why can't Excel see my code?!

Post Reply
Old 06-07-2010, 6:40 PM   #1
Member
Join Date: Aug 2000
Location: Cardiff
Experience Points:
5,524, Level: 17
Points: 5,524, Level: 17 Points: 5,524, Level: 17 Points: 5,524, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Thanks: Gave 4, Got 13
Posts: 495
Unhappy Why can't Excel see my code?!

Calling Excel experts. Hopefully one of you can make me look stupid.

I have a worksheet full of extracted rows of data from other sheets. A key column is the one containing an identifying code such as "AER", "LAKE" and "AIS". The front worksheet in the workbook is a summary sheet that lists a total for each code, based on the COUNTIF function. It all works perfectly well, except for "LDS". For some reason I simply fail to understand, Excel cannot count the "LDS" codes. The total remains zero. If I manually change the codes to "LDSX" and change the COUNTIF function to count them, bingo, the total appears. When I remove the X, the total returns to zero.

Anyone? Please!
  Quote
Old 16-07-2010, 3:27 PM   #2
Distinguished Member
Join Date: Aug 2006
Location: Redditch
Experience Points:
28,191, Level: 40
Points: 28,191, Level: 40 Points: 28,191, Level: 40 Points: 28,191, Level: 40
Activity: 89.2%
Activity: 89.2% Activity: 89.2% Activity: 89.2%
Thanks: Gave 39, Got 2,263
Posts: 12,817
Have you by any chance got a named range or worksheet called LDS making the string ambigous ?
  Quote
Old 16-07-2010, 5:01 PM   #3
Member
Join Date: Aug 2000
Location: Cardiff
Experience Points:
5,524, Level: 17
Points: 5,524, Level: 17 Points: 5,524, Level: 17 Points: 5,524, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Thanks: Gave 4, Got 13
Posts: 495
Thanks for the interest, but it appears to be down to 'non-printing' characters or 'whitespace' issues. I've had some success with the CLEAN function, but can't quite integrate it into the macro so far.
  Quote
Old 16-07-2010, 5:47 PM   #4
Distinguished Member
Join Date: Aug 2006
Location: Redditch
Experience Points:
28,191, Level: 40
Points: 28,191, Level: 40 Points: 28,191, Level: 40 Points: 28,191, Level: 40
Activity: 89.2%
Activity: 89.2% Activity: 89.2% Activity: 89.2%
Thanks: Gave 39, Got 2,263
Posts: 12,817
Quote:
Originally Posted by Mr Pleasant View Post
Thanks for the interest, but it appears to be down to 'non-printing' characters or 'whitespace' issues. I've had some success with the CLEAN function, but can't quite integrate it into the macro so far.
Try the like comparison rather than equality.

For example "sssgNDSjjj" like "*NDS*" is true. If its leading zeros then the right$ function will remove any leading characters
  Quote
Post Reply

Powered by  
 Latest popular product prices
Sun Microsystems StarOffice 5.2 
1 price
 £3.30 Click to show/hide the offers

Dell Microsoft Access 2002 XP Be... 
1 price
 £10.12 Click to show/hide the offers

Dell Microsoft Access 2003 Begin... 
1 price
 £10.12 Click to show/hide the offers

Dell Microsoft Windows XP Beginn... 
1 price
 £10.12 Click to show/hide the offers

Dell Home Networking (90-day lic... 
1 price
 £10.12 Click to show/hide the offers

Dell Microsoft Word 2002 XP Begi... 
1 price
 £10.12 Click to show/hide the offers

Dell Microsoft Word 2000 Beginne... 
1 price
 £10.12 Click to show/hide the offers

Dell Time Management (60-day lic... 
1 price
 £10.12 Click to show/hide the offers

 Updated February 13th at 12:30am. Prices include delivery.


Thread information and display options
Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off