+ Reply to Thread
Results 1 to 4 of 4

looking for a vba code for a button please help

  1. #1
    Registered User
    Join Date
    04-14-2013
    Location
    michigan
    MS-Off Ver
    Excel 2007
    Posts
    3

    looking for a vba code for a button please help

    I'm trying to select a cell in columns a based on a value in range ("c4").
    is there such a code besides the one below? if I use this code for every cell
    then the code will be too long and it want work.
    it should be a loop code but cant find one.
    needs to be from range a1:a2000. Thanks


    If Range("a1") = range ("c4") then
    Range ("a1") .select
    End if

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,078

    Re: looking for a vba code for a button please help

    Maybe this (Im no VBA expert)

    Please Login or Register  to view this content.
    Last edited by Special-K; 04-14-2013 at 11:35 AM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: looking for a vba code for a button please help

    Hi, pelums1,

    you could use Find or Macth (sample code attached) instaed of a loop:
    Please Login or Register  to view this content.
    I donīt like to loop but anyhow:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    04-14-2013
    Location
    michigan
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: looking for a vba code for a button please help

    thanks special k it work just the way i wanted it too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1