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: 193
Default Looping statment

I have a spreadsheet that I use to track shipments and new orders on and I
thought it might be helpful to automat it a little.

In tab 1 I have last weeks orders.
In tab 2 I have this weeks orders.
A 3rd tab is present to list any differences that might occur from shipments
or new orders.
I have been working a code to compare list 1 to list 2 but can't seam to get
any results. I was wondering if this code will work or does someone have a
better idea.

Set MyFirstRange = Range("Prev_Cust_List") `(Tab 1~B3:B600)
Set MySecondRange = Range("Curr_Cust_List") `(Tab 2~B3:B600)
fnd = 0

For Each C In MyFirstRange
For Each n In MySecondRange
If C.Value = n.Value Then
Sheets("Changes to Make").Select
Range("A1").Select
C.Offset(0, 1).Value = n.Offset(0, 0).Value
fnd = 1
End If
Next

`With the customer list sort alph in coloum "A" of both tabs.

If any customer order #'s appear in on list but not the other then I want to
list them in a seperate tab to view sort. The layout of the preadsheet does
have multiple blank spaces seperating the different customers and each
customer could have multiple orders, which are listed by number (Starting at
2 cells down and 1 cell to the left.)

Any help would be greatly appreciated.
--
Pete
 
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
IF, AND statment Karas Excel Worksheet Functions 1 March 8th 10 08:48 PM
if statment Stuntz Waldorf Excel Worksheet Functions 4 June 24th 09 08:07 PM
IF Statment Momo Excel Discussion (Misc queries) 2 December 7th 08 01:56 AM
IF Statment Momo Excel Worksheet Functions 2 December 6th 08 02:24 PM
If statment helpdesk genie Excel Worksheet Functions 2 January 12th 05 03:23 AM


All times are GMT +1. The time now is 01:48 AM.

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"