remove dates only ...

  • Thread starter Thread starter Annette
  • Start date Start date
A

Annette

Is it possible to remove dates only in a column and leave everything else?
How would I write that in a macro?

example:

05/01
83658930j


How would I remove only the date and leave the number with the letter
character?

Thanks!
 
based on your previous posts, these are not dates, but strings.

if dates, you can loop through the column and test with isdate.

If not, then you will have to look for the "/" if that is unique. (you can
use this in either case as shown)

Dim cell as Range
for each cell in Range(Cells(1,1),Cells(rows.count,1).End(xlup))
if instr(cell.Text,"/") then
cell.ClearContents
end if
Next
 
Very intuitive, you are .. and it works perfectly and finishes the job!
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top