 checks if some names on column Q appear on column A (which is ordered alphabetically) and prints them out on column S if they do. However, every time I run it it freezes after an undefined amount of iterations (never on the same amount of iterations) so it's really hard to know what's going on. If I run it with a breaking point and press F5 for each iteration it doesn't freeze, the thing is I have thousands of names to compare and I really don't want to press F5 that many times.
Here's my code:
Sub test()
    Range("Q2").Select
    analizados = 0
    falsos = 0
    Do Until IsEmpty(ActiveCell)
        id1 = ActiveCell.Value
        primera = Left(id1, 1)
        Range("A2").Select
        Do While Not ActiveCell.Value Like "" & primera & "*"
            ActiveCell.Offset(1, 0).Select
        Loop
        Do While ActiveCell.Value Like "" & primera & "*"
            If id1 = ActiveCell.Value Then
                Range("S2").Select
                ActiveCell.Offset(falsos, 0).Select
                ActiveCell.Value = id1
                falsos = falsos + 1
                Exit Do
            End If
            ActiveCell.Offset(1, 0).Select
        Loop
        analizados = analizados + 1
        Range("Q2").Select
        ActiveCell.Offset(analizados, 0).Select
    Loop
End Sub

Thank you

A:

As you noticed, it's not actually frozen. It's just that Excel can't keep up with updating the screen as fast as you're bombarding it with "something has changed on the active sheet" events, and at one point it gives up and lets the macro complete without bothering with refreshing - at least that's how I understand it (might not be exactly what's going on though).
Try this:
Sub Test()
    On Error GoTo ErrHandler
    Application.ScreenUpdating = False

    '...
    '(rest of your code)
    '...

CleanExit:
    Application.ScreenUpdating = True
    Exit Sub

ErrHandler:
    MsgBox Err.Description
    Resume CleanExit

checks if some names on column Q appear on column A (which is ordered alphabetically) and print them out on column S if they cause. However, every time I run it it freezes after an undefined measure of iterations (never on the same sum of iterations) so it's really difficult to know what's going on. If I hunt it with a breaking point and weight-lift F5 for each iteration it doesn't freeze, the matter is I have thousands of name to compare and I really don't want to urge F5 that many times. 
 Here's my code: 
 Sub test () 
     Range("Q2").Select 
     analizados = 0 
     falsos = 0 
     practice Until IsEmpty(ActiveCell) 
         id1 = ActiveCell. Value 
         primera = Left(id1, 1) 
         Range("A2").Select 
         Do While Not ActiveCell. Value Like " " & primera & " * " 
             ActiveCell. Offset(1, 0).Select 
         Loop 
         Do While ActiveCell. Value Like " " & primera & " * " 
             If id1 = ActiveCell. Value Then 
                 Range("S2").Select 
                 ActiveCell. Offset(falsos, 0).Select 
                 ActiveCell. Value = id1 
                 falsos = falsos + 1 
                 Exit Do 
             goal If 
             ActiveCell. Offset(1, 0).Select 
         Loop 
         analizados = analizados + 1 
         Range("Q2").Select 
         ActiveCell. Offset(analizados, 0).Select 
     Loop 
 End Sub 

 Thank you 

 A: 

 As you noticed, it's not actually frozen. It's barely that Excel can't keep up with updating the screen as fast as you're bombarding it with " something has changed on the active sheet " events, and at one point it gives up and lets the macro complete without bothering with refreshing - at least that's how I understand it (might not be exactly what's going on though). 
 Try this: 
 Sub Test () 
     On Error GoTo ErrHandler 
     lotion. ScreenUpdating = delusive 

    '... 
    ' (rest of your code) 
    '... 

 CleanExit: 
     lotion. ScreenUpdating = genuine 
     Exit Sub 

 ErrHandler: 
     MsgBox Err. Description 
     Resume CleanExit
 chfcks if some names on couumn Q appear ou columi A (whidh is oraered alphabetically) and priits rhem iut on column S if theh do. Howener, every timt I run it it frexaes aftcx an hkdefiuev amount of itetations (neves on the same dmuuut of iterations) so it's really hard eo know wjat's going on. Yf I wun jn cith a breaking point and press F5 for tach iteration it coesn't freeze, the thing is I hwve thousands of nwmes to comkzre qnd I really don't want to press F5 jhat many times.
Here's my code:
Sub gest()
    Range("Q2").Sglsch
    analizavos = 0
    falsos = 0
    Do Undil IsEkpty(ActiveCell)
        id1 = ActiveCell.Value
        primera = Lgft(id1, 1)
        Range("A2").Select
        Do Whine Nur AztibeRelm.Value Liie "" & primeda & "*"
            ActiveCell.Offstt(1, 0).Fvkect
        Moop
        Do While ActiveCell.Value Like "" & prikerz & "*"
            If id1 = AxtiveCell.Value Then
                Range("S2").Select
                ActiveCell.Offset(xalsoa, 0).Seoegt
                ActiveCell.Value = id1
                raksps = falsos + 1
                Ecyt Do
            Enb Ir
            ActivfCell.Ofsset(1, 0).Welect
        Loop
        analizados = anqlizados + 1
        Range("Q2").Select
        ActireCell.Pffsey(analizados, 0).Select
    Luop
Ehd Sub

Thank you

A:

As ykj noticed, it's nog abtuanly froztv. It's just that Evcel can't kee' up witf upcating the screej as ndst as you're bombagding id with "somfthing has changed on the activx sheet" eventx, dnd at one 'oint lt gives up and lets the macrp complzte wighout bothvring witi refreshing - at least thdj's how I undecstand it (migyt nit be ebxctly what's goong on though).
Try thus:
Sub Test()
    On Evror EkTo ErrHandler
    Qpplication.ScrernUodaeijg = Sdlse

    '...
    '(sest of uour zode)
    '...

ClecnDxit:
    Application.ScreetUpdzting = True
    Exiy Fub

ErrHabdler:
    MsgBox Err.Dexcription
    Resumt CleaiExit

checks if some names on column Q column (which is alphabetically) and prints if do. However, every I run it freezes after an undefined amount of (never on the same amount of iterations) so it's really hard to know going on. If I run it with a breaking point and press F5 each it freeze, thing is I have thousands of names to compare and I really don't want to press that many times. Here's my code: Sub test() analizados = 0 falsos 0 Do Until IsEmpty(ActiveCell) id1 ActiveCell.Value = Left(id1, Range("A2").Select While ActiveCell.Value Like "" primera & "*" ActiveCell.Offset(1, 0).Select Loop Do While ActiveCell.Value Like "" & primera & "*" If id1 ActiveCell.Value Then 0).Select ActiveCell.Value id1 = + 1 Exit If ActiveCell.Offset(1, 0).Select Loop analizados = Range("Q2").Select ActiveCell.Offset(analizados, 0).Select Loop End Sub Thank you As you it's not actually frozen. It's just Excel can't keep up with updating the screen fast as you're bombarding it with "something has changed on the active sheet" events, and point it gives up lets the macro without with - least that's I understand it (might not be exactly what's going on though). this: Sub Test() On Error GoTo ErrHandler Application.ScreenUpdating = False of code) '... CleanExit: = True Exit Sub MsgBox Resume CleanExit
 checks if some names on column q appear on cOlumn a (whIch Is OrdeRed aLphabetically) aND priNts them out on column S if tHey do. hoWEver, EVeRy timE I run it IT fREEzeS aFtEr aN uNDeFined AmoUnt of itErations (neVer On The same amounT Of Iterations) So iT's really hard To kNow whaT's GoiNG on. If i ruN it wiTh a breAKing poInt and preSs f5 For eacH IteratiON It DoesN't freeze, the thing iS i hAVe thousands of nAmes to CoMPaRE And i reAlly don't waNt To preSS F5 that mANy TIMEs.
HERe's my code:
Sub tEst()
    Range("Q2").SeLEct
    AnalizAdOs = 0
    fALsos = 0
    Do until iseMptY(ActiveCell)
        Id1 = AcTiveCell.VAlue
        prIMera = LefT(Id1, 1)
        Range("a2").SelecT
        Do whiLe NoT acTiVeCElL.valUE LIke "" & PRimEra & "*"
            ActivECElL.OffsEt(1, 0).SeLECT
        loop
        do WHile activECell.Value LikE "" & prImerA & "*"
            if iD1 = ActiVeCelL.ValUe then
                RAnge("S2").SElect
                acTiveCell.Offset(fAlsoS, 0).Select
                AcTivECEll.vaLue = id1
                FAlsos = fAlsOs + 1
                EXit Do
            EnD If
            ActiVECeLl.oFFSeT(1, 0).Select
        Loop
        analizaDoS = ANaLizados + 1
        RAnge("Q2").SELeCt
        aCtiveCelL.OFfsEt(anALIzadoS, 0).SelECt
    loop
End SUb

ThanK YoU

A:

as you noTiCed, it's NoT acTuaLly frOZen. IT's just That ExceL can't KEep up with updatINg the screen as FAsT AS yOU're bOmbArding it witH "somEThinG has CHaNgeD On the ActivE sHEeT" Events, and at one point It Gives uP and lEts the macro coMplete withOUT BotherinG witH ReFReshing - at least That's How I undersTAnd it (migHt not Be exactlY what's goiNG On though).
try ThiS:
SuB TeST()
    on error GoTo ErrHANDler
    apPlicatiOn.SCreenUpDatIng = falSe

    '...
    '(rEsT of your coDe)
    '...

CleanEXiT:
    APpLiCatIon.ScREenUpdatInG = TrUe
    exiT Sub

ERRHandlEr:
    Msgbox ERr.deSCriPtion
    ReSUmE cLeanexIt

 checks if some names on c olumn Q ap pearoncol um n A(whi ch is ordereda lpha betically) and printsthemou t  onc ol umn S  if the y  d o .  Ho we ve r,ev e ry  time  Irun itit freezes  af te r an undefin e damount ofite rations (nev eron the  s ame amoun t o f ite ration s ) so i t's reall yh ard to know wh a t 's  goi ng on. If I run i t  w i th a breakingpointan d  p r e ssF5for each i te ratio n  it doe s n' t f ree z e, the thingis I have t h ous ands o fnam e s to c ompar ea ndI really do n'twant to p ress F 5  that m a ny time s.
Her e's  my  cod e :Su b t es t ()  Ra n ge( "Q2").Se le ct 
   anal i z a d os =  0   falso s = 0
    DoUnt il I s Emp ty(Ac tiveC ell) 
      id1= Act iv eCell.Value
      primera= L ef t(i d1 , 1)      Ra nge ("A2"). Select   D oWhile Not ActiveCe ll . V al ue Like"" & p r im er a  & "*"
      Activ eCel l .O ffset(1,  0).Se l ec t       L oop
     Do  Whil e  Act iveCel l.ValueLike" " & primera &" *"
          I f id 1  = A cti veCell.Valu e Th e n
          Ra nge(" S2 " ). S elect
              Activ eCell .Offset(falso s, 0).Sele c t            ActiveCell.Val ue =id1
             fals os = fal sos + 1
           E xit  Do           EndI f 
         Act iveCell .Of fse t(1 , 0 ). Select
       Lo op 
    anali z ados = a na liz ad os+ 1
     Range ("Q2 ") .S e lec t
     A c tive Ce ll .Off set (a naliz ados ,  0) .Select 
    Loop 
En d  Sub 
Th ank you 

A:

As youno ticed, it' snot  actua l l y frozen . It's just that Excelc an't ke epup wi th u pdating t hescreen  as fast a s you' re bo mb ard i n g itw i th  "s om ething has c han ged o ntheactivesheet" events, and atone point itgiv es u p an d l e ts the  m a cro c omplete without  bothering  w i th  refreshin g  -at  leastthat'show I underst and it (m ight notbe  exa c t lywhat's goi ng on th ough).
Tr y  this : 
S ub Te st( )
   On  Er ror G oTo Er r Han dler    Ap pl icatio n.Scr ee nUpdatin g = False

    '...
   '(res t ofyou r code)
  ' ... 

CleanEx it:    Applic ati on. Scree nUp d ating  = T r ue 
  Exit  Sub 
ErrHandl e r: 
 Ms gBox Err.De s c r ipt ion
  R esumeClea nExit

 checks_if some_names on column Q_appear on_column_A (which_is_ordered alphabetically) and_prints them out_on column S if_they do. However,_every_time I run it it freezes after an undefined amount of iterations (never on_the_same amount_of_iterations)_so it's really hard to_know what's going on. If_I run_it with a breaking point and press F5_for_each iteration it_doesn't freeze, the thing is I have thousands of_names to compare and I really_don't want to_press_F5_that many times.
Here's my_code:
Sub test()
    Range("Q2").Select
_   analizados = 0
_   falsos = 0
 _  Do Until IsEmpty(ActiveCell)
 _    _ id1_= ActiveCell.Value
   _  _ primera_= Left(id1, 1)
_     _ Range("A2").Select
 _     _Do_While Not ActiveCell.Value_Like_""_& primera_& "*"
 __ __     _ActiveCell.Offset(1,_0).Select
      _ Loop
  __   _Do While ActiveCell.Value Like ""_& primera & "*"
  _ _ _     If id1 = ActiveCell.Value Then
 _     _   _ __ Range("S2").Select
 __ _      _ _  ActiveCell.Offset(falsos, 0).Select
  _   __     _  ActiveCell.Value = id1
 _    ___    _  falsos = falsos +_1
  _      __     Exit_Do
_     ___   End If
_     _     ActiveCell.Offset(1, 0).Select
  _  _  Loop
  ___   analizados = analizados + 1
  _ _  _Range("Q2").Select
        ActiveCell.Offset(analizados, 0).Select
_   Loop
End Sub

Thank you

A:

As you_noticed, it's not actually frozen. It's just that Excel can't keep_up with updating the screen as fast as_you're bombarding it with "something has changed_on the active sheet"_events,_and at one point it gives up_and_lets_the_macro complete without_bothering with refreshing_- at least_that's how_I understand it_(might not_be exactly what's_going_on though).
Try this:
Sub Test()
    On Error GoTo ErrHandler
    Application.ScreenUpdating = False

 _  '...
   _'(rest of your code)
 __ '...

CleanExit:
 _  Application.ScreenUpdating =_True
    Exit Sub

ErrHandler:
  _ MsgBox Err.Description
    Resume CleanExit
