Excel thinks random junk is formula

EDUCATED MONKEY

Board Regular
Joined
Jul 17, 2011
Messages
218
Rich (BB code):
Rich (BB code):
Rich (BB code):
Sub Removetop()
Application.ScreenUpdating = False
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Dim row As Long
Dim TheData As String
Dim WhereIs As Integer
Dim Target, cell As Range
Dim c As Range
Dim d As Range
<o:p> </o:p>
For row = 1 To 20
Worksheets("Recieved Data").Select
TheData = Worksheets("Recieved Data").Cells(row, 1).Value  ' column A
If InStr(TheData, "=-- Chicago Tribune") = 1 Then
TheData = " "
Worksheets("Recieved Data").Cells(row, 1).Value = TheData
End If
<o:p> </o:p>
If TheData = " Enlarge" Then
WhereIs = row
GoTo Removetop
End If
Next row
<o:p> </o:p>
Removetop:
Do While WhereIs <> 0
Sheets("Recieved Data").Select 'source sheet
Worksheets("Recieved Data").Cells(WhereIs, 1).Select
Selection.Delete Shift:=xlUp
WhereIs = WhereIs - 1
Loop
<o:p> </o:p>
Set Target = Sheets("Recieved Data").Range(Range("A1"), Range("A70").End(xlUp))
For Each c In Target
c = Replace(c, "DEWEY edition", "Ziditon")
Next
Application.ScreenUpdating = True
End Sub

<o:p> </o:p>
This is the contents of column A
Count Karlstein<o:p></o:p>
or The Ride of the Demon Huntsman<o:p></o:p>
Philip Pullman<o:p></o:p>
<o:p> </o:p>
ISBN: 9780440862666<o:p></o:p>
Format: Paperback<o:p></o:p>
Publisher:Random House Children's Books<o:p></o:p>
Edition: New edition<o:p></o:p>
View new edition<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
<o:p> </o:p>
Rating: Write a review <o:p></o:p>
<o:p> </o:p>
A Transylvanian spoof by the author of "Spring-heeled Jack". It consists of a melodramatic adventure tale in words, cartoons and jokes, about Zamiel, the Demon Huntsman. He terrorizes the villagers of Karlstein, and is offered the evil Count Karlstein's two young nieces as part of a bargain. <o:p></o:p>
<o:p> </o:p>
Synopsis Details Reviews <o:p></o:p>
Young Charlotte is locked in a tower room of her uncle's gloomy Castle Karlstein. Her evil uncle, Count Karlstein, has promised to sacrifice his two orphaned nieces, Lucy and Charlotte, to Zamiel the Demon Huntsman--on midnight of All Souls' Eve--in return for his current riches. First, the heartless Count and his "lip-licking, moist-handed, creeping, smarming" secretary, Herr Arturo Snivelwurst, will have to catch them. ISBN 0440862663 Weight (grammes) 85 <o:p></o:p>
ISBN13 9780440862666<o:p></o:p>
(What's this?) Published in London <o:p></o:p>
Publisher Random House Children's Books Height (mm) 194 <o:p></o:p>
Imprint Yearling (imprint of Random House Children's Books) Width (mm) 131 <o:p></o:p>
Format Paperback Spine width (mm) 8 <o:p></o:p>
Publication date 10 Jan 1998 Academic level Children (6-12) <o:p></o:p>
Illustrator Patrice Aggs Interest age from 9 to 11 <o:p></o:p>
DEWEY 823.914 Reading age From 8 to 11 <o:p></o:p>
Ziditon DC21 Alternative ISBN 9780307286000 <o:p></o:p>
Pages 112 <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Imagine a plot zippy enough to make young readers want to stay up late, very late, to finish it.... There is slapstick and suspense aplenty for all ages.<o:p></o:p>
#NAME? <<<<<<< This is the cause of the error<o:p></o:p>
Actuall text = “=-- Chicago Tribune” <<<<<<< i guess Excel thinks its a formula when it’s just random junk My attempt to remove it failed why?<o:p></o:p>
Can you tell how to get rid of it as the text after “=--“ is unknown it needs to find it from this part alone<o:p></o:p>
<o:p> </o:p>
Be the first to write a customer review<o:p></o:p>
<o:p> </o:p>
Printable Buying options £5.99 <o:p></o:p>
Add to basketBuy Online: <o:p></o:p>
Online availability:<o:p></o:p>
Usually despatched within 10 days <o:p></o:p>
Reserve in-store:<o:p></o:p>
Buy used:<o:p></o:p>
33 new & used available from £0.73<o:p></o:p>
<o:p> </o:p>
Customers who bought this also bought:<o:p></o:p>
| <o:p></o:p>
Jewellery<o:p></o:p>
<o:p> </o:p>
Michele Rowan, Michael Poynder<o:p></o:p>
<o:p> </o:p>
£29.95<o:p></o:p>
<o:p> </o:p>
Add to basket | <o:p></o:p>
Castle<o:p></o:p>
<o:p> </o:p>
Nix, Garth<o:p></o:p>
<o:p> </o:p>
£5.99<o:p></o:p>
<o:p> </o:p>
Add to basket | <o:p></o:p>
Jewellery<o:p></o:p>
<o:p> </o:p>
Michele Rowan, Michael Poynder<o:p></o:p>
<o:p> </o:p>
£29.95<o:p></o:p>
<o:p> </o:p>
Add to basket
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Anything that starts with an equals sign is a formula to Excel. You can edit the cell and add a leading apostrophe, or format the cells as Text before data is copied in.
 
Upvote 0
Hello thanks for that, so if i set the cells in the column to text first i should be able to detect and delete the junk data?

pete
 
Upvote 0

Forum statistics

Threads
1,224,538
Messages
6,179,412
Members
452,912
Latest member
alicemil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top