Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default find and replace Excel 2007

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 225
Default find and replace Excel 2007

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default find and replace Excel 2007

I get a message saying "Excel can not find any data to replace." I have
never had this problem occur in past years but this is the first year of
using 2007 for this calculation. I am selecting a range Col. D to P. and a
varying number of rows. It will only make the replace in the first two
columns. i.e. 16 replacements were made when the range held about 60 or 70
blank cells. When I try to select any columns past these, I get the message
above. I can't select individual columns or ranges. This is occurring on
several different workbooks. Any other ideas would be much appreciated.

"Sheeloo" wrote:

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default find and replace Excel 2007

Just some guesses...

Edit|replace (or ctrl-h) is limited to the usedrange. So if your data doesn't
go down far enough--or not far enough to the right, then excel may not find
anything to change.

You can check the used range by hitting ctrl-end. If that takes you past what
you need, then this isn't the problem.

But if it doesn't take you far enough down and to the right, you can extend the
used range by typing something in that bottom right cell (and finish the entry
with an enter). Then hit the delete key to clear the contents of that cell.
Test to see if it worked by hitting ctrl-end.

My other guess is that you have something in those cells. It could be space
characters or even those non-breaking HTML codes (char(160)'s).

If you use a formula like:
=len(a1)
(where A1 is one of the offending cells)
do you see 0?

I saved this from a previous post. You may find it useful:

Chip Pearson has a very nice addin that will help determine what that
character(s) is:
http://www.cpearson.com/excel/CellView.aspx

Depending on what that character is, you may be able to use alt-#### (from the
number keypad) to enter the character into the Other box in the text to columns
wizard dialog.

In fact, you may be able to select the character (in the formula bar), and copy
it. Then use ctrl-v to paste into that text to columns Other box.

You may be able to use Edit|Replace to change the character--Some characters can
be entered by holding the alt-key and typing the hex number on the numeric
keypad. For example, alt-0010 (or ctrl-j) can be used for linefeeds. But I've
never been able to get alt-0013 to work for carriage returns.

Another alternative is to fix it via a formula:

=substitute(a1,char(##),"")

Replace ## with the ASCII value you see in Chip's addin.

Or you could use a macro (after using Chip's CellView addin):

Option Explicit
Sub cleanEmUp()

Dim myBadChars As Variant
Dim myGoodChars As Variant
Dim iCtr As Long

myBadChars = Array(Chr(##)) '<--What showed up in CellView?

myGoodChars = Array("")

If UBound(myGoodChars) < UBound(myBadChars) Then
MsgBox "Design error!"
Exit Sub
End If

For iCtr = LBound(myBadChars) To UBound(myBadChars)
ActiveSheet.Cells.Replace What:=myBadChars(iCtr), _
Replacement:=myGoodChars(iCtr), _
LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False
Next iCtr

End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Lynne wrote:

I get a message saying "Excel can not find any data to replace." I have
never had this problem occur in past years but this is the first year of
using 2007 for this calculation. I am selecting a range Col. D to P. and a
varying number of rows. It will only make the replace in the first two
columns. i.e. 16 replacements were made when the range held about 60 or 70
blank cells. When I try to select any columns past these, I get the message
above. I can't select individual columns or ranges. This is occurring on
several different workbooks. Any other ideas would be much appreciated.

"Sheeloo" wrote:

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default find and replace Excel 2007


Thanks for the suggestions. The range test showed not to be a problem. But
when I did the =len(a1) I did get 0 in that cell. That means there are
characters behind, right? Can these me removed all at once?

"Dave Peterson" wrote:

Just some guesses...

Edit|replace (or ctrl-h) is limited to the usedrange. So if your data doesn't
go down far enough--or not far enough to the right, then excel may not find
anything to change.

You can check the used range by hitting ctrl-end. If that takes you past what
you need, then this isn't the problem.

But if it doesn't take you far enough down and to the right, you can extend the
used range by typing something in that bottom right cell (and finish the entry
with an enter). Then hit the delete key to clear the contents of that cell.
Test to see if it worked by hitting ctrl-end.

My other guess is that you have something in those cells. It could be space
characters or even those non-breaking HTML codes (char(160)'s).

If you use a formula like:
=len(a1)
(where A1 is one of the offending cells)
do you see 0?

I saved this from a previous post. You may find it useful:

Chip Pearson has a very nice addin that will help determine what that
character(s) is:
http://www.cpearson.com/excel/CellView.aspx

Depending on what that character is, you may be able to use alt-#### (from the
number keypad) to enter the character into the Other box in the text to columns
wizard dialog.

In fact, you may be able to select the character (in the formula bar), and copy
it. Then use ctrl-v to paste into that text to columns Other box.

You may be able to use Edit|Replace to change the character--Some characters can
be entered by holding the alt-key and typing the hex number on the numeric
keypad. For example, alt-0010 (or ctrl-j) can be used for linefeeds. But I've
never been able to get alt-0013 to work for carriage returns.

Another alternative is to fix it via a formula:

=substitute(a1,char(##),"")

Replace ## with the ASCII value you see in Chip's addin.

Or you could use a macro (after using Chip's CellView addin):

Option Explicit
Sub cleanEmUp()

Dim myBadChars As Variant
Dim myGoodChars As Variant
Dim iCtr As Long

myBadChars = Array(Chr(##)) '<--What showed up in CellView?

myGoodChars = Array("")

If UBound(myGoodChars) < UBound(myBadChars) Then
MsgBox "Design error!"
Exit Sub
End If

For iCtr = LBound(myBadChars) To UBound(myBadChars)
ActiveSheet.Cells.Replace What:=myBadChars(iCtr), _
Replacement:=myGoodChars(iCtr), _
LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False
Next iCtr

End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Lynne wrote:

I get a message saying "Excel can not find any data to replace." I have
never had this problem occur in past years but this is the first year of
using 2007 for this calculation. I am selecting a range Col. D to P. and a
varying number of rows. It will only make the replace in the first two
columns. i.e. 16 replacements were made when the range held about 60 or 70
blank cells. When I try to select any columns past these, I get the message
above. I can't select individual columns or ranges. This is occurring on
several different workbooks. Any other ideas would be much appreciated.

"Sheeloo" wrote:

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default find and replace Excel 2007

If you got 0 from =len(a1), then A1 didn't contain any characters.

Did you mistype your response?



Lynne wrote:

Thanks for the suggestions. The range test showed not to be a problem. But
when I did the =len(a1) I did get 0 in that cell. That means there are
characters behind, right? Can these me removed all at once?

"Dave Peterson" wrote:

Just some guesses...

Edit|replace (or ctrl-h) is limited to the usedrange. So if your data doesn't
go down far enough--or not far enough to the right, then excel may not find
anything to change.

You can check the used range by hitting ctrl-end. If that takes you past what
you need, then this isn't the problem.

But if it doesn't take you far enough down and to the right, you can extend the
used range by typing something in that bottom right cell (and finish the entry
with an enter). Then hit the delete key to clear the contents of that cell.
Test to see if it worked by hitting ctrl-end.

My other guess is that you have something in those cells. It could be space
characters or even those non-breaking HTML codes (char(160)'s).

If you use a formula like:
=len(a1)
(where A1 is one of the offending cells)
do you see 0?

I saved this from a previous post. You may find it useful:

Chip Pearson has a very nice addin that will help determine what that
character(s) is:
http://www.cpearson.com/excel/CellView.aspx

Depending on what that character is, you may be able to use alt-#### (from the
number keypad) to enter the character into the Other box in the text to columns
wizard dialog.

In fact, you may be able to select the character (in the formula bar), and copy
it. Then use ctrl-v to paste into that text to columns Other box.

You may be able to use Edit|Replace to change the character--Some characters can
be entered by holding the alt-key and typing the hex number on the numeric
keypad. For example, alt-0010 (or ctrl-j) can be used for linefeeds. But I've
never been able to get alt-0013 to work for carriage returns.

Another alternative is to fix it via a formula:

=substitute(a1,char(##),"")

Replace ## with the ASCII value you see in Chip's addin.

Or you could use a macro (after using Chip's CellView addin):

Option Explicit
Sub cleanEmUp()

Dim myBadChars As Variant
Dim myGoodChars As Variant
Dim iCtr As Long

myBadChars = Array(Chr(##)) '<--What showed up in CellView?

myGoodChars = Array("")

If UBound(myGoodChars) < UBound(myBadChars) Then
MsgBox "Design error!"
Exit Sub
End If

For iCtr = LBound(myBadChars) To UBound(myBadChars)
ActiveSheet.Cells.Replace What:=myBadChars(iCtr), _
Replacement:=myGoodChars(iCtr), _
LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False
Next iCtr

End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Lynne wrote:

I get a message saying "Excel can not find any data to replace." I have
never had this problem occur in past years but this is the first year of
using 2007 for this calculation. I am selecting a range Col. D to P. and a
varying number of rows. It will only make the replace in the first two
columns. i.e. 16 replacements were made when the range held about 60 or 70
blank cells. When I try to select any columns past these, I get the message
above. I can't select individual columns or ranges. This is occurring on
several different workbooks. Any other ideas would be much appreciated.

"Sheeloo" wrote:

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default find and replace Excel 2007

Just thought of something to add. These numbers were copied and pasted from
a downloaded mark sheet from a website that holds my students marks. Is it
possible that there is something behind the cell that is blocking the blank
value from being read. If I clear content in the cell the replacement will
work. If this is the case, is there a way to clear content from blank cells
only in a range?

"Sheeloo" wrote:

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 248
Default find and replace Excel 2007

See Dave's suggestion...

Also try
=Code(A1)
changing A1 to some of the cells..
YOu can check the LEN of the cells

Try F5-Spcecial...

BUT remember there is NO difference in behavior because of Excel 2007...



"Lynne" wrote:

Just thought of something to add. These numbers were copied and pasted from
a downloaded mark sheet from a website that holds my students marks. Is it
possible that there is something behind the cell that is blocking the blank
value from being read. If I clear content in the cell the replacement will
work. If this is the case, is there a way to clear content from blank cells
only in a range?

"Sheeloo" wrote:

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default find and replace Excel 2007

Used f5 - special and the cells in the sheet are definately not blank. I
applied the addin as Dave suggested and found hex code for the cells but can
only still replace one cell at a time instead of the selected range.

"Sheeloo" wrote:

See Dave's suggestion...

Also try
=Code(A1)
changing A1 to some of the cells..
YOu can check the LEN of the cells

Try F5-Spcecial...

BUT remember there is NO difference in behavior because of Excel 2007...



"Lynne" wrote:

Just thought of something to add. These numbers were copied and pasted from
a downloaded mark sheet from a website that holds my students marks. Is it
possible that there is something behind the cell that is blocking the blank
value from being read. If I clear content in the cell the replacement will
work. If this is the case, is there a way to clear content from blank cells
only in a range?

"Sheeloo" wrote:

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default find and replace Excel 2007

What did you find from Chip's addin?

What happened when you ran that macro to clean up the code?

Lynne wrote:

Used f5 - special and the cells in the sheet are definately not blank. I
applied the addin as Dave suggested and found hex code for the cells but can
only still replace one cell at a time instead of the selected range.

"Sheeloo" wrote:

See Dave's suggestion...

Also try
=Code(A1)
changing A1 to some of the cells..
YOu can check the LEN of the cells

Try F5-Spcecial...

BUT remember there is NO difference in behavior because of Excel 2007...



"Lynne" wrote:

Just thought of something to add. These numbers were copied and pasted from
a downloaded mark sheet from a website that holds my students marks. Is it
possible that there is something behind the cell that is blocking the blank
value from being read. If I clear content in the cell the replacement will
work. If this is the case, is there a way to clear content from blank cells
only in a range?

"Sheeloo" wrote:

I don't think there is any difference between 2003 and 2007 as far as this
behavior is concerned...

You must have at least one non-blank cell in the range for your method to
work.... If all are blanks then you can simply type 0 and press CTRL-ENTER
after selecting the range...

-Sheeloo
-------------------------------------
Pl. click 'Yes' if this was helpful...

"Lynne" wrote:

In 2003 I used to be able to select a range that contained blank cells and
use find and replace to change the blanks to 0 for an array formula to work.
Now 2007 says it can't find any matching data if I leave the find field
blank. Any ideas? There are alot of empty cells that need a 0 value!

Thanks


--

Dave Peterson


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 do I find and replace within a selection in Excel 2007? geoff Excel Discussion (Misc queries) 4 December 8th 08 11:54 PM
Global find and replace in Excel 2007 Woodman Excel Discussion (Misc queries) 1 November 3rd 08 11:44 PM
Find & Replace in Excel 2007 RM Excel Discussion (Misc queries) 3 July 3rd 08 12:20 AM
how do i find edit, replace in excel 2007 willyhoops.com Excel Discussion (Misc queries) 2 February 1st 07 02:45 PM
find and replace - replace data in rows to separated by commas msdker Excel Worksheet Functions 1 April 15th 06 01:00 AM


All times are GMT +1. The time now is 05:45 PM.

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"