In an Excel VBA, how to detect a cell with a & character in a For loop ?
You don’t necessarily need a loop in that case, here is an example of code for Excel VBA that allow you to find quickly and easily the cells that include this character :
Number = Application.CountIf(Columns("A"), "&")
If Number > 0 Then
Lig = Rows.Count
For Cptr = 1 To Number
Lig = Columns("A").Find("&", Cells(Lig, "A")).Row
MsgBox ("text" & Lig)
Note: Commissions may be earned from the links above.
This page contains references to products from one or more of our advertisers. We may receive compensation when you click on links to those products. For an explanation of our advertising policy, please visit this page.