Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro needed to fill down base on condition
I have accounts that I need to compare to see if they exist on my system the account that has a listed date, exist on my system then if I can fill the dates in the accounts the match then I will be able to delete the other accounts that don’t have a date see attach file for more understanding thankyou all for any help provided +-------------------------------------------------------------------+ |Filename: SAMPLE.xls | |Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=105| +-------------------------------------------------------------------+ -- MARTINEZ_PEDRO ------------------------------------------------------------------------ MARTINEZ_PEDRO's Profile: http://www.thecodecage.com/forumz/member.php?userid=207 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=84306 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro needed to fill down base on condition
Sub Removeduplicates()
RowCount = 2 Do While Range("B" & RowCount) < "" If Range("A" & RowCount) = "" Then 'put x on rows to delete Range("E" & RowCount) = "X" Else If Range("B" & RowCount) = _ Range("B" & (RowCount + 1)) Then Range("A" & RowCount).Copy _ Destination:=Range("A" & (RowCount + 1)) End If End If RowCount = RowCount + 1 Loop 'sort to bring x's to top of worksheet LastRow = Range("B" & Rows.Count).End(xlUp).Row Set SortRange = Rows("1:" & LastRow) SortRange.Sort _ key1:=Range("E1"), _ order1:=xlAscending, _ header:=xlYes LastRow = Range("E2").End(xlDown).Row Rows("2:" & LastRow).Delete End Sub "MARTINEZ_PEDRO" wrote: I have accounts that I need to compare to see if they exist on my system the account that has a listed date, exist on my system then if I can fill the dates in the accounts the match then I will be able to delete the other accounts that dont have a date see attach file for more understanding thankyou all for any help provided +-------------------------------------------------------------------+ |Filename: SAMPLE.xls | |Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=105| +-------------------------------------------------------------------+ -- MARTINEZ_PEDRO ------------------------------------------------------------------------ MARTINEZ_PEDRO's Profile: http://www.thecodecage.com/forumz/member.php?userid=207 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=84306 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
[SOLVED]: macro needed to fill down base on condition
THANK YOU JOEL the code works perfectly appreciate :Bgr -- MARTINEZ_PEDRO ------------------------------------------------------------------------ MARTINEZ_PEDRO's Profile: http://www.thecodecage.com/forumz/member.php?userid=207 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=84306 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert full row from worksheer to another base on condition | Excel Discussion (Misc queries) | |||
How do I split one table in multiple tables base on condition? | Excel Programming | |||
sum top 5 base on one condition | Excel Worksheet Functions | |||
sum of top 5 base on one condition | Excel Worksheet Functions | |||
Addition base on condition | Excel Worksheet Functions |