View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Setup Cells Without Looping

When dealing with the contents of cells, Excel/VBA can extract values, text,
or formulas in an array. Any other property cannot be extracted as an array,
but merely as a scalar value. To get this scalar, VBA uses the property
value for the top left cell.

Why not use Copy Paste Special Values?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"FSt1" wrote in message
...
hi
i did some test too. it works if all the formats are the same but doesn't
if
the formats are different.
using xl02 on xp here.
seems the xl code allows for the transfer of different values range to
range
but not different formats. odd.
i'm at a loss. but i will just make note of this as something learned.

Regards
FSt1

"Gary''s Student" wrote:

Strange I still can't get it to work.

I formatted A1 with one decimal place
I formatted B1 with two decimal places
I formatted C1 with three decimal places

after I run sample1 I get:

1.0 1.00 1.000

1 1 1

after I run sample2 nothing changes !?!

--
Gary''s Student - gsnu200832


"Stringer" wrote:


I copied your code and set
A1:C1 as Date
A3:C3 as text
Ran the code
A3:C3 became Formatted as date


--
Stringer
------------------------------------------------------------------------
Stringer's Profile:
http://www.thecodecage.com/forumz/member.php?userid=117
View this thread:
http://www.thecodecage.com/forumz/sh...ad.php?t=60083