LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Condition based copy/paste of range

Hello everyone

I am new to excel vba n stucked in a problem hop i wil get help form
this forum

i hav around 2000 data in my worksheet n need to sort it out

My data is like this

1 2
3 4
5 6
7 8
9 10
13 15
15 16
17 19
19 21
28 27

as shown above i hav data in two columns wat i want to do is to copy
and paste the above values in different column based on condition say
in coulm c,d, e,f

Condition is if cell(2,1)-cell(1,1) and cell( 2,1)- cell( 2,2)
[subtraction]
3 or < -3 then copy the value of cell(2,1)&cell(1,1) in col c & col d exit for


move to next row if condition is not true then copy the range

just like this
a b c d e f g h
1 2 1 2 13 15 28 27
3 4 3 4 17 19
5 6 5 6 19 21
7 8 7 8 [these values r in
9 10 9 10 diff col. bn 13 &9,
13 15 10&15 is grtr than 3
15 16
17 19 [copied d above range
19 21 bcoz deiff is less than 3 ]
28 27

Hope sum of u get time time to help me put as i m begnr in it n trying
hard to xplore xcel - vba

many thanx

 
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
macro to copy and paste based on a condition kathryn462 Excel Discussion (Misc queries) 5 October 14th 08 12:59 AM
Copy and Paste based on Condition EJ Excel Discussion (Misc queries) 1 June 27th 07 11:17 PM
Condition based copy/paste of range [email protected] Excel Programming 0 April 27th 07 05:48 AM
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


All times are GMT +1. The time now is 06:23 AM.

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"