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: 1
Default Stuck on a validation loop

Hi all,

It's been a few years since I've done any kind of VB programming (or any
programming for that matter), but I am trying to automate a reporting
process that I have to do every morning as part of my job.

What I am trying to achieve is to get the contents of a cell on one sheet
of a workbook (after importing data), check it against a cell on another
sheet, repeat the process for another cell but then make sure that the 2
cells that have been found are on the same row.

So at the moment it's something along these lines:

celldate = Worksheets("Sheet1").Cells(currentrow, currentcolumn)
MsgBox (celldate)

founddate = Worksheets("Primes & Outlets").Cells.Find(celldate)
MsgBox (founddate)

If founddate = celldate Then verifieddate = True

And the same goes for checking the 'day' as well.

The only problem being is that whereas there is only 1 01-FEB-05, there
are many THURSDAY(s). So what I want to do is check to make sure
something like founddate.Row = foundday.Row.

Having not written any code in such a long time I'm having difficulty
getting the syntax right for what I need to do...which is:

if foundday.Row < founddate.Row then
foundday = .FindNext(day)
until
foundday.Row = founddate.Row
EndIf

....or something like that, like I said, I've not done this for years.

Hope one of you can help
--
Stu


 
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
stuck in an error loop Darla Excel Discussion (Misc queries) 1 January 8th 10 06:06 PM
Stuck in a Sub Loop robzrob Excel Worksheet Functions 4 July 19th 08 11:53 PM
Excel with game is stuck in a loop [email protected] Excel Discussion (Misc queries) 2 December 19th 06 08:11 PM
Stuck in a loop CWillis Excel Discussion (Misc queries) 2 June 5th 06 02:49 PM
Limit search range then loop thru' each cell...a bit stuck... ste mac Excel Programming 1 December 17th 04 01:35 PM


All times are GMT +1. The time now is 12:52 PM.

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"