logo elektroda
logo elektroda
X
logo elektroda

Excel VBA: Find Specific Value in Column and Perform an Action after Condition Met

gr3krk 14124 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16246590
    gr3krk
    Level 9  
    Hello,
    I am asking you for help because I can not deal with it. I am aware that this is nonsense but still ... :)

    I need a VBA code that checks if there is a specific value in the given column, for example "1" and if it does something like doing it (eg opening a different file and copying the indicated values - I have done and works ... I just need to condition) and if not it goes on to the next part.


    Thanks in advance for your help.
    Greetings.
  • ADVERTISEMENT
  • #2 16246737
    adamas_nt
    Moderator of Programming
    And the If-Then-Else statement does not work?
  • ADVERTISEMENT
  • Helpful post
    #3 16247567
    kinggustav
    Level 27  
    Maybe try searching through "CtrlF"? In VBA it will be like this:
    Dim r1 as Range
    Set r1 = Range ("C1", Range ("C1"). End (xlDown)). Find ("Search")
    If r1 Is Nothing Then 'not found
    ...
  • #4 16249023
    gr3krk
    Level 9  
    Thanks for the answers!

    kinggustav, works :) ) Thanks again.
ADVERTISEMENT