Format + Data

A

AA

{='c:\mywb.xls'!myRange} reads the area myRange into the
current worksheet when entered as an array formula in an
identical area. However, this does not retrieve the format
of the cells from c:\mywd.xls.

Is there a way of getting the data with the format?
 
G

GB

AA said:
{='c:\mywb.xls'!myRange} reads the area myRange into the
current worksheet when entered as an array formula in an
identical area. However, this does not retrieve the format
of the cells from c:\mywd.xls.

Is there a way of getting the data with the format?

You can do it in VBA code, using pastespecial and xlPasteFormats. I don't
think it is possible to it as a worksheet function
 
A

AA

Thnak you. I am using VBA as you suggest; however, it is
very slow. I need to speed up the code.
 
S

shockley

You should be able to get any or all of the individual pieces of the cell's
format with code like:

Sub Tester()
Cells(2, 1).Interior.ColorIndex = _
Cells(1, 1).Interior.ColorIndex
End Sub

This will probably run a lot faster than the copy/paste method, even if you
are getting all the format properties.

HTH,
Shockley
 

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