Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default copy rows with values - not formulas

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(Age6;Age<16);"b.
7-15";OM(OCH(Age15;Age<26);"c. 16-25";OM(OCH(Age25);"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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default copy rows with values - not formulas

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(Age6;Age<16);"b.
7-15";OM(OCH(Age15;Age<26);"c. 16-25";OM(OCH(Age25);"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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy (Formulas and Formatting ONLY) no values to other rows Kenny Excel Discussion (Misc queries) 1 July 27th 08 08:06 PM
copy formulas without associated values dranreb Excel Worksheet Functions 0 April 3rd 06 10:22 PM
Rows & Cols - copy formulas in Col A to # rows in Col B Mikey Excel Programming 4 August 11th 05 07:23 PM
Copy Values, not formulas Tobias[_2_] Excel Programming 1 May 5th 04 11:04 AM
Range COPY function - how to copy VALUES and not formulas James Cooke Excel Programming 1 August 21st 03 07:04 PM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"