+ Reply to Thread
Results 1 to 6 of 6

Search for cells that start with a certain letter of the alphabet

  1. #1
    Registered User
    Join Date
    04-11-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Search for cells that start with a certain letter of the alphabet

    Hi there!
    I am really green when it comes to VBA programing in excel, so i am here asking for help for what it seems to be a great community

    I am using Excel 2007, and I need a macro to select the cells that start with a certain letter of the alfabet and then clear the contents of those cells leaving them blank.

    I got this so far:
    Please Login or Register  to view this content.
    I saw this code in a faq and edited it a bit, this code instead of making the selected cells blank it makes the whole row blank, i want to make it to go search all the cells in a worksheet, when it finds a match puts the cell blank, repeating the process until there is no more cells with the starting letter of the alphabet that we chose.
    As you can see I really dont have much experience in programming at all, so any help that i can get will be much apreciated

    Best regards
    Rick
    Last edited by Rick85; 04-14-2010 at 05:48 PM.

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Search for cells that start with a certain letter of the alphabet

    Hi take a look here
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Search for cells that start with a certain letter of the alphabet

    Is it just one column that you are searching or the whole sheet?

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    04-11-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Search for cells that start with a certain letter of the alphabet

    Thx for replies

    Quote Originally Posted by Domski View Post
    Is it just one column that you are searching or the whole sheet?

    Dom
    I Need a macro to search the whole worksheet


    Quote Originally Posted by contaminated View Post
    Hi take a look here
    Thx for the link i tried using some of those codes there but none works so far
    i saw this code there:
    Please Login or Register  to view this content.
    this code was supossed to find all cells with value "a" i think, but i run it and it does nothing nothing

    Still cant figure it out how to do this macro

    Best regards
    Rick

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Search for cells that start with a certain letter of the alphabet

    Try this:

    Please Login or Register  to view this content.

    Dom

  6. #6
    Registered User
    Join Date
    04-11-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Search for cells that start with a certain letter of the alphabet

    I cant believe it ...it works!
    Now i can stop pulling out my hairs
    Thank you so much for sharing your expertize Dom, I am eternally grateful.
    Thanks again


    Rick

+ 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