Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Hidden Character Find Macro Help

I have a sheet that in Row 1 has text. Within that text, there is also a
character/s (maybe carriage return, not sure) that is messing everything up.

I need a way to automate (e.g. macro) that row only having "valid
characters." i'm not sure if i would use an ascii chart or what to weed them
out. i can only have characters 32 - 126, in an ascii chart. I can send the
sheet in question.

thanks,
mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Hidden Character Find Macro Help

Hi Mark,

in say A2
= Clean(A1)
copy across, then copy row 2 and paste special values

Regards,
Peter T




"mvyvoda" wrote in message
...
I have a sheet that in Row 1 has text. Within that text, there is also a
character/s (maybe carriage return, not sure) that is messing everything

up.

I need a way to automate (e.g. macro) that row only having "valid
characters." i'm not sure if i would use an ascii chart or what to weed

them
out. i can only have characters 32 - 126, in an ascii chart. I can send

the
sheet in question.

thanks,
mark



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Hidden Character Find Macro Help

This is perfect! So, i'm newish to VBA, normally I would record a macro, then
go from there. I'm sure there's an easier way to this clean function to an
entire row, that in the macro, i wouldn't have to use another row. i'd
imagine just a place holder variable.

can someone (PT?) help with this as well?

thanks so much,
-m

"Peter T" wrote:

Hi Mark,

in say A2
= Clean(A1)
copy across, then copy row 2 and paste special values

Regards,
Peter T




"mvyvoda" wrote in message
...
I have a sheet that in Row 1 has text. Within that text, there is also a
character/s (maybe carriage return, not sure) that is messing everything

up.

I need a way to automate (e.g. macro) that row only having "valid
characters." i'm not sure if i would use an ascii chart or what to weed

them
out. i can only have characters 32 - 126, in an ascii chart. I can send

the
sheet in question.

thanks,
mark




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hidden Character Find Macro Help

Dim rng as Range, cell as Range
set rng = ActiveCell.EntireRow
for each cell in rng
if not isempty(cell) then
cell = application.Clean(cell)
end if
Next

--
Regards,
Tom Ogilvy


"mvyvoda" wrote in message
...
This is perfect! So, i'm newish to VBA, normally I would record a macro,

then
go from there. I'm sure there's an easier way to this clean function to an
entire row, that in the macro, i wouldn't have to use another row. i'd
imagine just a place holder variable.

can someone (PT?) help with this as well?

thanks so much,
-m

"Peter T" wrote:

Hi Mark,

in say A2
= Clean(A1)
copy across, then copy row 2 and paste special values

Regards,
Peter T




"mvyvoda" wrote in message
...
I have a sheet that in Row 1 has text. Within that text, there is also

a
character/s (maybe carriage return, not sure) that is messing

everything
up.

I need a way to automate (e.g. macro) that row only having "valid
characters." i'm not sure if i would use an ascii chart or what to

weed
them
out. i can only have characters 32 - 126, in an ascii chart. I can

send
the
sheet in question.

thanks,
mark






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Hidden Character Find Macro Help

I think when setting a ref to .EntireRow or .EntireColumn, and going to
process each cell in the ref, need to include .Cells,

set rng = ActiveCell.EntireRow.Cells

alternatively
set rng = ActiveCell.EntireRow
For each cell in rng.Cells

Regards,
Peter T

"Tom Ogilvy" wrote in message
...
Dim rng as Range, cell as Range
set rng = ActiveCell.EntireRow
for each cell in rng
if not isempty(cell) then
cell = application.Clean(cell)
end if
Next

--
Regards,
Tom Ogilvy


"mvyvoda" wrote in message
...
This is perfect! So, i'm newish to VBA, normally I would record a macro,

then
go from there. I'm sure there's an easier way to this clean function to

an
entire row, that in the macro, i wouldn't have to use another row. i'd
imagine just a place holder variable.

can someone (PT?) help with this as well?

thanks so much,
-m

"Peter T" wrote:

Hi Mark,

in say A2
= Clean(A1)
copy across, then copy row 2 and paste special values

Regards,
Peter T




"mvyvoda" wrote in message
...
I have a sheet that in Row 1 has text. Within that text, there is

also
a
character/s (maybe carriage return, not sure) that is messing

everything
up.

I need a way to automate (e.g. macro) that row only having "valid
characters." i'm not sure if i would use an ascii chart or what to

weed
them
out. i can only have characters 32 - 126, in an ascii chart. I can

send
the
sheet in question.

thanks,
mark









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hidden Character Find Macro Help

Yes. My Bad. Thanks for the correction.

--
Regards,
Tom Ogilvy


"Peter T" <peter_t@discussions wrote in message
...
I think when setting a ref to .EntireRow or .EntireColumn, and going to
process each cell in the ref, need to include .Cells,

set rng = ActiveCell.EntireRow.Cells

alternatively
set rng = ActiveCell.EntireRow
For each cell in rng.Cells

Regards,
Peter T

"Tom Ogilvy" wrote in message
...
Dim rng as Range, cell as Range
set rng = ActiveCell.EntireRow
for each cell in rng
if not isempty(cell) then
cell = application.Clean(cell)
end if
Next

--
Regards,
Tom Ogilvy


"mvyvoda" wrote in message
...
This is perfect! So, i'm newish to VBA, normally I would record a

macro,
then
go from there. I'm sure there's an easier way to this clean function

to
an
entire row, that in the macro, i wouldn't have to use another row. i'd
imagine just a place holder variable.

can someone (PT?) help with this as well?

thanks so much,
-m

"Peter T" wrote:

Hi Mark,

in say A2
= Clean(A1)
copy across, then copy row 2 and paste special values

Regards,
Peter T




"mvyvoda" wrote in message
...
I have a sheet that in Row 1 has text. Within that text, there is

also
a
character/s (maybe carriage return, not sure) that is messing

everything
up.

I need a way to automate (e.g. macro) that row only having "valid
characters." i'm not sure if i would use an ascii chart or what to

weed
them
out. i can only have characters 32 - 126, in an ascii chart. I can

send
the
sheet in question.

thanks,
mark









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Hidden Character Find Macro Help

awesome!! this worked. it seemed so easy.

thanks for the help AGAIN!!,
Mark

"Tom Ogilvy" wrote:

Dim rng as Range, cell as Range
set rng = ActiveCell.EntireRow
for each cell in rng
if not isempty(cell) then
cell = application.Clean(cell)
end if
Next

--
Regards,
Tom Ogilvy


"mvyvoda" wrote in message
...
This is perfect! So, i'm newish to VBA, normally I would record a macro,

then
go from there. I'm sure there's an easier way to this clean function to an
entire row, that in the macro, i wouldn't have to use another row. i'd
imagine just a place holder variable.

can someone (PT?) help with this as well?

thanks so much,
-m

"Peter T" wrote:

Hi Mark,

in say A2
= Clean(A1)
copy across, then copy row 2 and paste special values

Regards,
Peter T




"mvyvoda" wrote in message
...
I have a sheet that in Row 1 has text. Within that text, there is also

a
character/s (maybe carriage return, not sure) that is messing

everything
up.

I need a way to automate (e.g. macro) that row only having "valid
characters." i'm not sure if i would use an ascii chart or what to

weed
them
out. i can only have characters 32 - 126, in an ascii chart. I can

send
the
sheet in question.

thanks,
mark






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
Finding (and eliminating) hidden "space" character smartgal Excel Discussion (Misc queries) 8 October 31st 08 03:45 AM
Hidden Character Sandy Excel Worksheet Functions 2 July 25th 07 05:32 PM
How do I delete hidden character in Excel? Isa Excel Discussion (Misc queries) 3 November 15th 05 04:29 PM
FIND a character Brian H Excel Discussion (Misc queries) 2 January 27th 05 02:56 PM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM


All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"