My code is giving exact the same output as he shown in the attachment.
My code is giving exact the same output as he shown in the attachment.
Change this line
Code:Const strOutPutCell As String = "H1" 'Change accordingly
with this one
Code:Const strOutPutCell As String = "A1" 'Change accordingly
@ivandgreat and LalitPandey87,
Try LalitPandey87's code against the second sample data you showed over in the MrExcel forum here...
Loop To Last EndPt
I get the code crashing Excel completely (if you do not stop it earlier enough using CTRL+Break). So my question is... was that second sample data real or not (it was the entire reason I did not give you a solution).
@LalitPandey87,
See the above link for the sample data and this link for why I did not understand how to provide any code to the OP (and for a hint at what I think is causing your code to crash when used against it)...
Loop To Last EndPt
I tried it again after reading your message and the data still crashed your code. Playing a hunch, I rebooted my computer and now, sure enough, your code works perfectly with that data. My computer must have picked up a "glitch" along the way which had been affecting Excel in some way. Sometimes I just hate computers!![]()
Bookmarks