Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to compare datas
Sub changeValues()
Const COLUMNB As String = "B" Const COLUMND As String = "D" Const COLUMNRESULTS = "E" Dim iStartingRow As Long Dim iLastRow As Long iLastRow = Range(COLUMNB & Rows.Count).End(xlUp).Row For iStartingRow = 2 To iLastRow If Range(COLUMNB & iStartingRow).Value = Range(COLUMND & iStartingRow).Value Then Range(COLUMNRESULTS & iStartingRow).Value = "YES" Else Range(COLUMNRESULTS & iStartingRow).Value = "NO" End If Next End Sub "Dani Lima" wrote: I need to compare a group of lines. On my worksheet there are lines with the same number or order (colum B) (numericaly classified) and another colum (D) with same datas, I need to compare if the number of the order are the same and if the data on the columm d at the same line are the same, if so, the macre should answer 'yes',if one of the datas on the columm d are different the macro should answer 'no'. Someone could help me? regards, Dani |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
transfer datas into different sheet using macro? | Excel Discussion (Misc queries) | |||
Trying to compare the datas... | Excel Worksheet Functions | |||
Counting datas in one range based on datas in another range | Excel Discussion (Misc queries) | |||
re : Finding the datas and deleting datas which are not found. | Excel Programming | |||
Create a Worksheet by getting datas from the txt file with Macro | Excel Programming |