LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default VBA Copy Range of cells with a condition to another worksheet

My response was a manual one, but if you really want VBA, you can record a
macro while performing the actions, then review the VBA code it generates.
There is usually a lot of extra code in the recorded macros, but it is a good
start if you need to repeat the actions often.

--
Daryl S


"SDS_Feole" wrote:

Thanks for the reply. Is your suggestion using VBA? I know how to do this
manually.

"Daryl S" wrote:

One way to do this is to add the automatic filter on, then select criteria
for each column to exclude blanks. Then copy/paste the remaining cells into
another worksheet. Look at Excel Help for more on this.

--
Daryl S


"SDS_Feole" wrote:

Hello,

I'm a beginner to Excel VBA so any suggestions would be very help.

Here's the scope. I have a worksheet that consists of 3 columns of data. 1
column has a formula (with a value) and the other 2 columns have values only.
In the rows, not all cells have data so I wish to omit those rows from the
copy process. I would like to copy the values from worksheet1 to worksheet 2
where all 3 rows have values omitting the rows that have null values.

Example:

Dept Account Amount
=====================
0000 10001 500
0000 30002 650
0000 30106 1139
40504
3454 51125
4050 46925 5000

In the example above, I would like to copy (from worksheet1 to worksheet2)
the first 3 lines and the last line that have values for Dept Account, and
Amount excluding line 4 and 5.

I hope I explained this clearly.

Thanks again for any suggestions
Tony


 
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 row content from one worksheet to another, if a condition met Lorilenore Excel Worksheet Functions 2 May 24th 08 08:36 PM
Copy Range / Including Adjacent Cells - into Existing Worksheet. [email protected] Excel Programming 1 January 14th 07 12:47 PM
Copy range based on condition Sotomayor Excel Programming 1 September 10th 06 01:11 AM
How to copy only some rows from range based on condition? [email protected][_2_] Excel Programming 2 January 30th 06 01:04 AM
Create/copy combo boxes in one range if condition is met in a different range LB[_4_] Excel Programming 4 September 30th 05 12:21 AM


All times are GMT +1. The time now is 11:16 PM.

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

About Us

"It's about Microsoft Excel"