ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format + Data (https://www.excelbanter.com/excel-programming/282049-format-data.html)

AA[_3_]

Format + Data
 
{='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?

GB[_3_]

Format + Data
 

"AA" wrote in message
...
{='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





AA[_3_]

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

-----Original Message-----

"AA" wrote in

message
...
{='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




.


GB[_3_]

Format + Data
 

"AA" wrote in message
...
Thnak you. I am using VBA as you suggest; however, it is
very slow. I need to speed up the code.


Do you want to post your code here?





shockley

Format + Data
 
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

"AA" wrote in message
...
Thnak you. I am using VBA as you suggest; however, it is
very slow. I need to speed up the code.

-----Original Message-----

"AA" wrote in

message
...
{='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




.





All times are GMT +1. The time now is 02:47 PM.

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