help with formula

djs6025

New Member
Joined
Feb 6, 2012
Messages
40
Office Version
  1. 2016
Platform
  1. Windows
Hi Everybody,
I know this is one is probably an easy one for you all. I have a long error report with over 10k lines I need help with. Attached is a sample of the spreadsheet. Column J shows which line the error is located on on the spreadsheet. Is there a way to highlight the row where the error shows up? For instance, cell J2 says "Line 3: Validation failed: Image failed to download.". Can a formula be written to highlight line 3 in red? As always, thanks so much for your help.


https://imgur.com/a/1ntKpeT


Thanks,
Dan
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Can't be done by formula, but I had a VBA solution in my archives.
I'm sue there will be simpler code, but it works for me...

Code:
Sub MM2()
Dim lCount As Long, l As Long, sText As Variant
Dim lNum As String, lr As Long
Application.ScreenUpdating = False
lr = Cells(Rows.Count, "J").End(xlUp).Row
For Each sText In Range("J2:J" & lr)
    For lCount = Len(sText) To 1 Step -1
        If IsNumeric(Mid(sText, lCount, 1)) Then
            l = l + 1
            lNum = Mid(sText, lCount, 1) & lNum
        End If
    If l = 1 Then lNum = CInt(Mid(lNum, 1, 1))
    Next lCount
Rows(lNum).Interior.Color = vbRed
lNum = ""
Next sText
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top