Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Find char in string and mark

I have several thousand address' in this format:

123 Any Street # 23
234 Main Street # A

I need to have a space after the #. In some cases I do not:

576 South Street #24

Using VBA how can I search a range (1 column) and find the address'
without the space and then mark the cell color red.

Thanks for your help!!
Fred

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Find char in string and mark

Hi Fred

After they are marked red what do you intend to do ?

Could you not use the Find/Replace function within Excel if what you are
doing is going to add a space to those cells maked red?

"Fred" wrote:

I have several thousand address' in this format:

123 Any Street # 23
234 Main Street # A

I need to have a space after the #. In some cases I do not:

576 South Street #24

Using VBA how can I search a range (1 column) and find the address'
without the space and then mark the cell color red.

Thanks for your help!!
Fred


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Find char in string and mark

On Jul 24, 10:32 am, steve_doc
wrote:
Hi Fred

After they are marked red what do you intend to do ?

Could you not use the Find/Replace function within Excel if what you are
doing is going to add a space to those cells maked red?



"Fred" wrote:
I have several thousand address' in this format:


123 Any Street # 23
234 Main Street # A


I need to have a space after the #. In some cases I do not:


576 South Street #24


Using VBA how can I search a range (1 column) and find the address'
without the space and then mark the cell color red.


Thanks for your help!!
Fred- Hide quoted text -


- Show quoted text -


Hi, I plan to send the Excel sheet to the data entry people to use as
a reference to fix the errors in the database.

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Find char in string and mark

Don't bother with VBA, use conditional formatting.

Select column A
Menu FormatConditional Formatting
Change Condition 1 To formula Is
Add a formula of =AND(ISNUMBER(FIND("#",A1)),NOT(ISNUMBER(FIND("# ",A1))))
Click Format
Select Pattern
Choose Red
OK
OK


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Fred" wrote in message
ps.com...
I have several thousand address' in this format:

123 Any Street # 23
234 Main Street # A

I need to have a space after the #. In some cases I do not:

576 South Street #24

Using VBA how can I search a range (1 column) and find the address'
without the space and then mark the cell color red.

Thanks for your help!!
Fred



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 can I find a value from one cell in a char string in another? tiredazdaddy Excel Worksheet Functions 2 November 20th 08 05:40 PM
FIND 1 char in cell of any 3 char =True Nastech Excel Discussion (Misc queries) 5 April 26th 08 02:17 PM
How to retrieve certain char within a string? Eric Excel Discussion (Misc queries) 1 July 3rd 07 03:02 AM
string/char CONTAINS function? jim sturtz Excel Worksheet Functions 3 May 31st 06 07:20 PM
last char of a string Buddy Lee Excel Programming 9 November 11th 05 02:02 AM


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