Copy Past format

N

Neflheim

Hello,

I need to move a Sunrise Sunset printout to excel. Problem is when I
copy the sheet off the net and paste it into excel, everything is
dumped into column A. The page im looking at is at
http://aa.usno.navy.mil/cgi-bin/aa_rstablew.pl

Is there a way to get this to format into individual columns? Any help
would be great thanks!
 
D

Don Guillett

Use data>text to columns>delimited with space as the delimiter. If you do
this OFTEN you should have a macro fetch it for you and automatically do the
text to columns for you.

You could modify this to suit. After the first time, just REFRESH instead of
adding the table again.
strurl="http://aa.usno.navy.mil/cgi-bin/aa_rstablew.pl"

With ActiveWorkbook.Worksheets("Data").QueryTables.Add( _
Connection:="URL;" & strurl,
Destination:=Worksheets("Data").Cells(1,1))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
code here to do text to columns
Next
 
N

Neflheim

thanks.. I was able to save as text and open in excel to get to the
functin you described I beleive..

thanks for the quick response.

Tom
 

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

Top