Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default PLEASE CAN ANY BODY HELP

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default PLEASE CAN ANY BODY HELP

You've posted this 4 times now.....and I already gave you some code
that will work in this thread;

http://groups.google.co.uk/group/mic...5c100456?hl=en

And if you want to adapt the above you need to change this line....

While i1 - j1 HdgRow And Cells(i1, "E").Value = Cells(i1 - j1,
"E").Value

and add;

And And Cells(i1, "F").Value = Cells(i1 - j1, "F").Value
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default PLEASE CAN ANY BODY HELP

On Apr 23, 9:34*am, anon wrote:
You've posted this 4 times now.....and I already gave you some code
that will work in this thread;

http://groups.google.co.uk/group/mic....programming/b...

And if you want to adapt the above you need to change this line....

While i1 - j1 HdgRow And Cells(i1, "E").Value = Cells(i1 - j1,
"E").Value

and add;

And And Cells(i1, "F").Value = Cells(i1 - j1, "F").Value


Hi anon I just have few questions about your code so I can better
understand how it works. Can you please give me little bit
explaination if you don’t mind

1 - "I = 1" what this recommend
2 - "J = 500" what this recommend
3 - "For Each C In ActiveSheet.Range("H6:H17") " how can I change
this range to H6 to the last value cell in column H
4 - "C1 = C.Offset(0, 1).Value" which column this code is
recommending I or J
5 - "C2 = C.Offset(0, 2).Value" which column this code is
recommending J or K
6 - For J = 6 To 17 how can I change this row change from 6 to last
value cell row in column H
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
Please any body help me.i need help as soon as possible [email protected] Excel Discussion (Misc queries) 0 June 20th 07 07:55 AM
Any body help me out with this? wwwrabbit Excel Discussion (Misc queries) 3 June 15th 06 08:46 PM
Can any body help me out? kvenku[_34_] Excel Programming 2 August 10th 04 03:29 PM
Can any body help? darno[_17_] Excel Programming 1 March 6th 04 11:33 PM
Can any body help? darno[_16_] Excel Programming 1 March 4th 04 09:34 AM


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