PC Review


Reply
Thread Tools Rate Thread

copy rows with values - not formulas

 
 
ulfb
Guest
Posts: n/a
 
      14th Apr 2010
Hi

First step is no problem:
in Sheet1 col AI this formula is inserted with VB to add age groups
=OM(OCH(Age>=0;Age<7);"a. 0-6";OM(OCH(Age>6;Age<16);"b.
7-15";OM(OCH(Age>15;Age<26);"c. 16-25";OM(OCH(Age>25);"d. 26-";""))))
Col is autofilled to last used row.

In next step I loop thru these rows to find certain rows and copy them to
Sheet2. Problem is that formula on each row is then copied. Instead I need it
to be values only!

Needs to work in Excel 2003 and 2007. Sheet1 can have >20 000 rows

Any smart ideas how I should handle this?

Thanks
Ulf
 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      14th Apr 2010
It will be xlPasteValue. So, something like this...

Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"ulfb" wrote:

> Hi
>
> First step is no problem:
> in Sheet1 col AI this formula is inserted with VB to add age groups
> =OM(OCH(Age>=0;Age<7);"a. 0-6";OM(OCH(Age>6;Age<16);"b.
> 7-15";OM(OCH(Age>15;Age<26);"c. 16-25";OM(OCH(Age>25);"d. 26-";""))))
> Col is autofilled to last used row.
>
> In next step I loop thru these rows to find certain rows and copy them to
> Sheet2. Problem is that formula on each row is then copied. Instead I need it
> to be values only!
>
> Needs to work in Excel 2003 and 2007. Sheet1 can have >20 000 rows
>
> Any smart ideas how I should handle this?
>
> Thanks
> Ulf

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hiding rows containing formulas which return zero values Roger on Excel Microsoft Excel Programming 3 23rd Aug 2008 04:03 AM
Copy (Formulas and Formatting ONLY) no values to other rows Kenny Microsoft Excel Misc 1 27th Jul 2008 08:06 PM
Rows & Cols - copy formulas in Col A to # rows in Col B =?Utf-8?B?TWlrZXk=?= Microsoft Excel Programming 4 11th Aug 2005 07:23 PM
Range COPY function - how to copy VALUES and not formulas James Cooke Microsoft Excel Programming 1 21st Aug 2003 07:04 PM
Range COPY function - how to copy VALUES and not formulas James Cooke Microsoft Excel Worksheet Functions 1 21st Aug 2003 07:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:48 PM.