PC Review


Reply
Thread Tools Rate Thread

CAN ANYBODY PLEASE AMEND MY MACRO

 
 
K
Guest
Posts: n/a
 
      22nd Apr 2008
Hi, I have data in sheet (see below)

ROW * * A * * * * * E * * * *F-----col
1 * * * * *3080 * * G16 * * 11
2 * * * * * *500 * * G16 * * 12
3 * * * * -3080 * * G16 * * 11
4 * * * * *3080 * * G16 * * 11
5 * * * * -3080 * * G16 * * 11
6 * * * * -3080 * * G16 * * 12
7 * * * * *5040 * * G34 * * 11
8 * * * *52590 * * G34 * * 12
9 * * * * -5040 * * G34 * * 11
10 * * * *5040 * * G34 * * 11
11 * * * -5040 * * G34 * * 11
12 * * * -5040 * * G34 * * 12

The macro below work perfectly fine the only thing I want to amend in
the macro below that at the moment macro check column "E" and then see
column "A" for DR and CR figures and when values in column "E" cells
match and have DR and CR figures in column "A" cells then it delete
the DR and CR rows. I want to add column "F" as well in macro below
that it should check column E & F and when values are same in both
columns like in above table in cell "E1" i have "G16" in cell "F1" i
have "11" and same values i have in cells "E3, E4 , E5 and F3 , F4 ,
F5" then it should delete the DR and CR figures row in column "A".
how can i add column "F" in macro below. any body can please help.

Sub DELDRCR()
* * HdgRow = 5
* * i1 = Cells(Rows.Count, "E").End(xlUp).Row
* * While i1 >= HdgRow + 2
* * * * j1 = 1
* * * * While i1 - j1 > HdgRow And Cells(i1, "E").Value = Cells(i1-
j1, "E").Value
* * * * * * If -Cells(i1, "A") = Cells(i1 - j1, "A") _
* * * * * * And IsNumeric(Cells(i1, "D")) Then
* * * * * * * * Rows(i1).DELETE
* * * * * * * * Rows(i1 - j1).DELETE
* * * * * * * * i1 = i1 - 2
* * * * * * * * j1 = 0
* * * * * * End If
* * * * * * j1 = j1 + 1
* * * * Wend
* * * * i1 = i1 - 1
* * Wend
End Sub
 
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
Macro To Amend Data In A Column Saruman Microsoft Excel Discussion 14 10th Jan 2008 09:40 AM
Insufficient pemissions to amend Excel files but can amend Word fi =?Utf-8?B?RiBMYXVmcw==?= Microsoft Windows 2000 Security 0 11th Oct 2006 12:28 PM
amend help =?Utf-8?B?dGluYQ==?= Microsoft Access Database Table Design 3 18th May 2005 08:19 PM
Amend a macro by macro Gareth Microsoft Excel Programming 4 22nd Feb 2004 05:11 PM
FindRecord macro not finding the record on Amend Member Details form =?Utf-8?B?Sm9zZXBo?= Microsoft Access Macros 1 10th Jan 2004 06:26 PM


Features
 

Advertising
 

Newsgroups
 


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