Report.Cells(i, A.Column).Interior. To compare two columns, use IF, ISERROR and MATCH in Excel. If InStr(1, Report.Cells(j, B.Column).Value, Report.Cells(i, A.Column).Value, vbTextCompare) > 0 Then Display Duplicates Unique Values in Each Column Row by Row Comparison. If Report.Cells(i, A.Column).Value "" Then It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. LastRowB = ("", Range(colB & 1), xlFormulas, xlByRows, xlPrevious).Row - 1 ' Last row in column B LastRowA = ("", Range(colA & 1), xlFormulas, xlByRows, xlPrevious).Row - 1 ' Last row in column A Set C = Application.InputBox("Select column to show results", "Results", Type:=8) Step 2: Click New Rule from Conditional Formatting option under the Styles group on the Home tab. Set B = Application.InputBox(Prompt:="Select column being searched", Title:="Column B", Type:=8) Step 1: Choose the dataset where the highlighting is to be done. Set A = Application.InputBox(Prompt:="Select column to compare", Title:="Column A", Type:=8) Sub ABTextCompare() Dim Report As WorksheetÄim lastRowA, lastRowB, lastRow, lastColumn As Integer In my case, I use large and different numbers of rows on each column. ![]() So I used form ( VBA macro to compare two columns and color highlight cell differences) codes and I modified few things to adapt it to my application and find any desired column (just by clicking it). I was trying to compare A-B columns and highlight equal text, but usinng the obove fomrulas some text did not match at all.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |