Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is it possible


code:
--------------------------------------------------------------------------------
10 Workbooks("NEWSIPTemplateTest.xls").Activate
'Start True
20 newone = True
30 Workbooks("NAPOR.xls").Activate
40 Sheets("TYCO").Select
50 Range("a2").Select
60 While Not IsEmpty(ActiveCell)
70 I
WorksheetFunction.CountIf(Workbooks("NEWSIPTemplat eTest.xls").Sheets("Produc
Master Entry").Range("PRSMOD_Range"), ActiveCell) = 0 Then
80 Application.CutCopyMode = False
90 ActiveCell.EntireRow.Copy
100 If newone Then
110 Workbooks("NEWSIPTemplateTest.xls").Activate
120 Sheets.Add
130 ActiveSheet.Name = "New Changes"
'End True


140 newone = False
150 End If
160 Workbooks("NEWSIPTemplateTest.Xls").Activate
170 Sheets("New Changes").Select
180 Range("a65536").End(xlUp).Offset(1, 0).Select
190 Selection.PasteSpecial xlValues

200 Columns("C:C").Select
210 Selection.NumberFormat = "m/d/yyyy"
220 Range("a65536").End(xlUp).Offset(1, 0).Select
230 With Selection.Font
240 .Name = "Arial"
250 .FontStyle = "Regular"
260 .Size = 10
270 .Strikethrough = False
280 .Superscript = False
290 .Subscript = False
300 .OutlineFont = False
310 .Shadow = False
320 .Underline = xlUnderlineStyleNone
330 .ColorIndex = 3
340 End With
350 Workbooks("NAPOR").Activate
360 End If
370 ActiveCell.Offset(1, 0).Select
380 Wend
--------------------------------------------------------------------------------







code:
--------------------------------------------------------------------------------
Workbooks("NEWSIPTemplateTest.xls").Activate
400 newone = True
410 Workbooks("NAPOR.xls").Activate
420 Sheets("TYCO").Select
430 Range("b2").Select
440 While Not IsEmpty(ActiveCell)
450 I
WorksheetFunction.CountIf(Workbooks("NEWSIPTemplat eTest.xls").Sheets("Produc
Master Entry").Range("PRSPN_Range"), ActiveCell) = 0 Then
460 Application.CutCopyMode = False
470 ActiveCell.EntireRow.Copy
480 If newone Then
490 Workbooks("NEWSIPTemplateTest.xls").Activate
500 newone = False
510 End If
520 Workbooks("NEWSIPTemplateTest.Xls").Activate
530 Sheets("New Changes").Select
540 Range("a65536").End(xlUp).Offset(1, 0).Select
550 Selection.PasteSpecial xlValues

560 Columns("C:C").Select
570 Selection.NumberFormat = "m/d/yyyy"
580 Range("a65536").End(xlUp).Offset(1, 1).Select
590 With Selection.Font
600 .Name = "Arial"
610 .FontStyle = "Regular"
620 .Size = 10
630 .Strikethrough = False
640 .Superscript = False
650 .Subscript = False
660 .OutlineFont = False
670 .Shadow = False
680 .Underline = xlUnderlineStyleNone
690 .ColorIndex = 3
700 End With
710 Workbooks("NAPOR").Activate
720 End If
730 ActiveCell.Offset(1, 0).Select
740 Wend
--------------------------------------------------------------------------------





I have 2 workbooks that I need to compare on a daily basis.

Code Lines 10-380 activate the workbook and compare "A2" to my othe
workbooks "PRSMod_Range" to see if the model exists. If the mode
exists then it goes to "A3" and repeats. If the model doesnt exist i
copies the entire row, creates the new sheet and pastes it. Then goe
to "A3" and repeats.

Code 400 - 740 Does the same as above, however, starts at B2 an
compares against "PRSPN_Range" which is the product number. If th
product number exists then it goes to "B3" and repeats. If the produc
number doesnt exist it copies the entire row, selects the new sheet an
pastes it. Then goes to "B3" and repeats.


What I would like it to do is compare all of the ranges and put th
differences on one row and change the differences to red.

My problem now is obviously it is comparing different ranges for sam
product. So on the new sheet starting with the 2nd set of code it wil
paste duplicate models.

Any thoughts?


--
SCSA25
------------------------------------------------------------------------
SCSA25's Profile: http://www.excelforum.com/member.php...o&userid=15106
View this thread: http://www.excelforum.com/showthread...hreadid=267394

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



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