Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default filtering rows of a spreadsheet

'i'm creating a filter for a spreadsheet with 2 sets of dates. 1 date is the
bill date, and the other is the calculation date. wherever there is a
duplicate bill date, the older of the calculation dates must be removed.

'i'm new to this, and my code doesnt work properly, but i'm trying to get
one thing to work at a time:
Sub filter()
Dim X, Y As Integer
Dim billdate1, billdate2

X = 5 'the "Date" column.
Y = 2 'start of the data.

Do Until Cells(X, Y).Value = "" 'this should loop until the end of the
data is reached
billdate1 = Cells(X, Y).Value 'i'm not sure what happens with a cell value
formatted as a date - is this going to work?
billdate2 = Cells(X, Y + 1).Value
If billdate1 = billdate2 Then
If Cells(X + 1, Y).Value Cells(X + 1, Y + 1).Value Then
'this has to remove the earlier of the 2 calc. dates and
then go back to the same row of data to test the next row against the result
Else
'same deal
End If
End If
Y = Y + 1
Loop
End Sub

all help is appreciated.
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
How do I Copy and Paste onto Same Rows after filtering out rows. TWT Excel Discussion (Misc queries) 2 October 20th 08 04:09 PM
filtering a spreadsheet sebas Excel Worksheet Functions 1 January 4th 08 03:50 PM
Filtering data to new spreadsheet MEAD5432 Excel Discussion (Misc queries) 2 March 23rd 07 01:46 AM
Excel 2003; spreadsheet with filtering; deleting rows MHcoTech Excel Worksheet Functions 0 September 6th 06 01:33 AM
MY SPREADSHEET IS NOT FILTERING CORRECTLY leighanne Excel Discussion (Misc queries) 1 April 18th 05 12:48 PM


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