i have attached the sheet, where "remarks provided" are there and "Remarks Keyed" also there.
I need VBA code to check if remark is keyed correctly, and if not then it tells which remark is not keyed.
sequence of remark keyed and remark provided will be different in the above case
this is for quality check on excel, currently we are doing manual comparison.
there is no lay out, the remark is just extracted from user data from excel.
we just need VBA code to automate the comparison between "remark provided" and "remark keyed".
So according to your initial attachment as a beginner starter :
PHP Code:
Sub Demo1() Const T = " ARE INVALID " Dim Rg As Range, R&, V, W Application.ScreenUpdating = False With Sheet1.UsedRange.Columns(1) Set Rg = .Find("Remark provided") If Not Rg Is Nothing Then R = Rg.Row Do V = Split(Replace(Rg(1, 2).Value, T, ""), ",") For Each W In Split(Replace(Rg(2, 2).Value, T, ""), ",") V = Filter(V, W, False) Next With Rg(1, 3).Resize(, 2) If UBound(V) < 0 Then .Value = [{True,"All Remark Keyed Correctly"}] _ Else .Value = Array(False, Join(V, ", ") & " not keyed in remark") End With Set Rg = .FindNext(Rg) Loop Until Rg.Row = R Set Rg = Nothing End If End With Application.ScreenUpdating = True End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
Bookmarks