Could someone help me debug this error?![]()
If InStr(cell.Text, "x") > 0 Then strText = Trim(cell.Text) cell = Left(strText, n - 5) & ":" & Left(Right(strText, 4), 2) & " AM" cell.NumberFormat = "h:mm AM/PM" cell.Font.bold = True End If
Could someone help me debug this error?![]()
If InStr(cell.Text, "x") > 0 Then strText = Trim(cell.Text) cell = Left(strText, n - 5) & ":" & Left(Right(strText, 4), 2) & " AM" cell.NumberFormat = "h:mm AM/PM" cell.Font.bold = True End If
What's in "n"?.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
n= len(trim(cell.text))
Is it 5 or less?
You know, we can't really guess what the rest of the code does, or what it's doing it to ...
Regards, TMS
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks