Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #28  
Old 02-03-2025, 03:12 AM
batman1 batman1 is offline Identify matches between sheet columns Windows 11 Identify matches between sheet columns Office 2013
Advanced Beginner
 
Join Date: Jan 2025
Posts: 57
batman1 is on a distinguished road
Default

Is this a code snippet?
Code:
With oOS
    lngOSLastRow = oOS.Range("A" & oOS.Rows.count).End(xlUp).Row
    If oFrm.optCreateFam Then
      oBasicBar.StatusMessage = "Defining Family relationship ... Please Wait"
'      co lngRecordIndex dong du lieu trong OVERLAY
      lngOSRow = 2
       Do While Len(.Cells(lngOSRow, 1).value) > 0
        'See min3 function notes below for more information
        .Cells(lngOSRow, lngOS_FamColNum) = min3(.Range(Cells(2, lngOS_FamMatchColIndex), Cells(lngOSLastRow, lngOS_FamMatchColIndex)), .Cells(lngOSRow, lngOS_FamMatchColIndex).value, .Range(Cells(2, lngOS_NDSRIColNum), Cells(lngOSLastRow, lngOS_NDSRIColNum)), .Range(Cells(2, 1), Cells(lngOSLastRow, 1)))
        If .Cells(lngOSRow, lngOS_FamColNum) <> .Cells(lngOSRow, 1) Then
          If WorksheetFunction.CountIfs(.Range(Cells(2, lngOS_FamMatchColIndex), Cells(lngOSLastRow, lngOS_FamMatchColIndex)), .Cells(lngOSRow, lngOS_FamMatchColIndex).value, .Range(Cells(2, 1), Cells(lngOSLastRow, 1)), .Cells(lngOSRow, lngOS_ParColNum)) = 0 Then
            .Cells(lngOSRow, lngOS_ParColNum) = .Cells(lngOSRow, lngOS_FamColNum)
          End If
        End If
        lngOSRow = lngOSRow + 1
        If lngOSRow Mod 100 = 0 Then oBasicBar.StepBar
      Loop
    End If
Do you want to write the above fragment and function min3 differently?
It is now 11:00 (UTC+01:00). I will check in the evening
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Remove the subtotal columns in a sheet Marcia Excel 3 12-01-2023 05:48 AM
Identify matches between sheet columns Relating cells in a row in one sheet to cells in columns on another sheet. mbesspiata3 Excel 2 01-06-2017 05:42 AM
Identify matches between sheet columns Create a New Sheet from Existing Sheet with Specific Columns malam Excel Programming 1 10-17-2014 10:01 PM
Identify matches between sheet columns From an XL sheet ,how to keep the group of columns which match with other XL sheet Zubairkhan Excel 2 03-04-2014 10:57 PM
Removing columns within sheet shabbaranks Excel 2 09-11-2012 05:03 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:54 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft