Показать сообщение отдельно

  #2  
Старый 07.09.2009, 17:08
Pashkela
Динозавр
Регистрация: 10.01.2008
Сообщений: 2,841
Провел на форуме:
9220514

Репутация: 3338


Отправить сообщение для Pashkela с помощью ICQ
По умолчанию

максрос:

PHP код:
Sub Макрос1()
Const 
intDataCol1 ' Номер столбца с кодами
Const intDataCol2 = 3 ' 
Номер столбца с ценами
Const intDataCol3 ' Номер столбца со странами
Const intMaxRow = 6 ' 
Номер последней строки в таблице
    Dim i
%, j%
    
Dim strValue1$, strValue2$, strValue3$, strValue4$, strValue5$, strValue6$
    For 
2 To intMaxRow 1
        strValue1 
Trim(Cells(iintDataCol1))
        
strValue3 Trim(Cells(iintDataCol2))
        For 
1 To intMaxRow
            strValue2 
Trim(Cells(jintDataCol1))
            
strValue4 Trim(Cells(jintDataCol2))
            If 
StrComp(strValue1strValue2vbTextCompare) = 0 Then
                
If strValue3 strValue4 Then
                    Cells
(jintDataCol1).Delete shift:=xlUp
                    Cells
(jintDataCol2).Delete shift:=xlUp
                    Cells
(jintDataCol3).Delete shift:=xlUp
                
Else
                    
Cells(iintDataCol1).Delete shift:=xlUp
                    Cells
(iintDataCol2).Delete shift:=xlUp
                    Cells
(iintDataCol3).Delete shift:=xlUp
                End 
If
            
End If
        
Next
    Next
End Sub 

Последний раз редактировалось Pashkela; 07.09.2009 в 17:18..