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: 557
Default CAN ANYBODY PLEASE AMEND MY MACRO

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
 
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
amend a VB code please Morgan Excel Discussion (Misc queries) 0 March 3rd 10 11:17 PM
Amend year E[_2_] Excel Worksheet Functions 4 January 15th 09 03:51 PM
Amend Code Help Please Paul Black Excel Programming 4 August 21st 07 01:19 PM
Amend code gavmer[_75_] Excel Programming 1 September 22nd 04 12:57 AM
Amend a macro by macro Gareth[_3_] Excel Programming 4 February 22nd 04 05:11 PM


All times are GMT +1. The time now is 12:29 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"