+ Reply to Thread
Results 1 to 5 of 5

Find cells by their formatting

  1. #1
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Find cells by their formatting

    I need code to find cells in a range A1:A75 using the format in the cell. These examples (Excluding the quote marks) "Adjflj, 26, 5" or "Calkd Madjf, 26.5, 10" show how the text looks. These cells always have text followed by two numbers and they always have the two comers.

    Can anyone solve this or get me started? Thanks.

    *Edit - Other cells have two comers in them so I have to use more than the comers to find the cells.

    Please Login or Register  to view this content.
    Last edited by ccpsc; 08-16-2012 at 06:28 PM.

  2. #2
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: Find cells by their formatting

    From my understanding you are not looking at the format, but the value of the cell.

    Can you not use Cond Formatting to highlight what you are looking for?

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Find cells by their formatting

    ccpsc,

    If you're looking for a specific format that those cells all share, you can use the Application.FindFormat to specify what format you're looking for, and then the .Find method with SearchFormat:=True. For example, this will find all cells in the A1:A75 range that have bold font and a red fill:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Find cells by their formatting

    Thanks for replying coreytroy and tigeravatar. coreytroy you are right format was probably the wrong word to use. The actual format of the cell is text, it is a bunch of information copied from a website and pasted as text. I want to extract only certain values from it. The cells I am after have the same string of text in them which is "text comer number comer number" or "Ahshhad, 24.5,2".

    I need a way of searching each cell in the range to find these cell with this string in them. I am a novice at this and I can not see how to adapt your code to do this but I may have steered you in the wrong direction with my original post.
    Last edited by ccpsc; 08-17-2012 at 12:57 AM.

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Find cells by their formatting

    ccpsc,

    Without seeing some sample data and desired results, it is difficult to give you accurate information. So...

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
    To attach a file, click the "Go Advanced" button and then click the paperclip icon to open the Manage Attachments dialog.

+ 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