Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default [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
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
Insert full row from worksheer to another base on condition Ziyadh Excel Discussion (Misc queries) 1 February 5th 12 01:05 PM
How do I split one table in multiple tables base on condition? SNK Excel Programming 1 March 27th 08 12:52 PM
sum top 5 base on one condition luvgreen Excel Worksheet Functions 2 June 28th 06 02:00 PM
sum of top 5 base on one condition luvgreen Excel Worksheet Functions 3 June 28th 06 05:51 AM
Addition base on condition 68magnolia71 Excel Worksheet Functions 4 April 15th 05 08:39 PM


All times are GMT +1. The time now is 09:07 AM.

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"