Sub vinod_New()
FHead = Sheets("Macro").Range("A" & i).Text
Range("A2:A" & lx).Formula = "=COUNTIF(B2:GF2,"&FHead&")"
Sub vinod_New()
FHead = Sheets("Macro").Range("A" & i).Text
Range("A2:A" & lx).Formula = "=COUNTIF(B2:GF2,"&FHead&")"
don't know why it would not recognize the FHead variable as text, to add the required quote marks in the formula, you need to use the ASCII code character. Otherwise, if you try to concatenate the quote marks in, it will treat the variable as a string value and produce a worksheet error.![]()
Please Login or Register to view this content.
Thanks JLG, this working now.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks