ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find value (31.12.9999) and clear (https://www.excelbanter.com/excel-programming/339836-find-value-31-12-9999-clear.html)

Tempy

Find value (31.12.9999) and clear
 
Hi all, i am back again !! I can clear all cells with the value above In
the column "CA" by using a loop statement, but is there perhaps a better
way ??

regards,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***

Harald Staff

Find value (31.12.9999) and clear
 
Search-replace perhaps ?
Glad you're back.

Best wishes Harald

"Tempy" skrev i melding
...
Hi all, i am back again !! I can clear all cells with the value above In
the column "CA" by using a loop statement, but is there perhaps a better
way ??

regards,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***




Tempy

Find value (31.12.9999) and clear
 
Yip, i used the following:

Sub RemoveWrongDate()
'
Range("CA:CA").Select
Selection.Replace What:="(31.12.9999)", Replacement:="",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("A1").Select
Columns("A:EP").EntireColumn.AutoFit

End Sub

If there are any other suggestions i would be gratefull

regards,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***

Dave Peterson

Find value (31.12.9999) and clear
 
I think you have the best (quickest and easiest anyway) solution.



Tempy wrote:

Yip, i used the following:

Sub RemoveWrongDate()
'
Range("CA:CA").Select
Selection.Replace What:="(31.12.9999)", Replacement:="",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("A1").Select
Columns("A:EP").EntireColumn.AutoFit

End Sub

If there are any other suggestions i would be gratefull

regards,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson


All times are GMT +1. The time now is 12:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com