How do I Update an Excel Spreadsheet from another Sheet.

I am working on a project to change several thousand server from Symantec AntiVirus to Symantec End Point Protection. We keep track of the servers in an Excel spreadsheet that I call “Master.xlsx” and the updates are in another Spreadsheet called “Update-Date.xlsx”. The trick is to update the Master once a week with those servers that have changed from SAV to SEP. And to limit the update to the first 14 columns. There may be better or more elegant ways to do this, but here is my solution:

#<---- Begin Powershell Script ------------------------------------------>
$d=Show-Inputbox -message "Enter Update Spredsheet Name" `
-title "Update File" -default "Update-Date.xlsx"
$e=Show-Inputbox -message "Enter the Update Tab Name" `
-title "Tab Name" -default "10-23-2010"
$xlCellTypeLastCell = 11
$path = "D:\SavToSep\MASTER.xlsx"

$xl = New-Object -ComObject excel.application
$xl.visible = $True
$xl.DisplayAlerts = $False
$wb = $"D:\SavToSep\MASTER.xlsx")
$ws = $wb.WorkSheets.item("Servers")
$wb1 = $"D:\SavToSep\$D.xlsx")
$ws1 = $wb1.WorkSheets.item($E)

$Rng = $ws1.UsedRange.Cells
$row = $Rng.Rows.Count
Write-Host "Row: " $row

for ($i = 2; $i -le $row; $i++) {
$x = $ws1.Cells.Item($i, 1).Value()
Write-Host "i: " $i
$Range = $ws1.range("a${i}:n$i")
$mainRng = $ws.usedRange
$objSearch = $mainRng.Find($x)

	If ($objSearch -eq $Null) {
	$used = $ws.usedRange
	$lastCell = $used.SpecialCells($xlCellTypeLastCell)
	$lastrow = $lastCell.row
	$NewRow = $lastrow + 1
	Write-Host "New Row: " "A"$NewRow

}Else {
	$R = $objSearch.row
	Write-Host "R: " $R

$rc=Show-Msgbox -message "Do you want to view the Spredsheet?" `
-icon "Question" -button "YesNoCancel" -title "Hey $env:username!!"

Switch ($rc) {
"Yes" {$xl.Visible = $True }
# close and release resources
"No" {$wb.close($false)
 spps -n excel
 "cancel" {"When in doubt, punt."}

# <------------- End Script ----------------------------------------------->;