+ Reply to Thread
Results 1 to 5 of 5

A loop if a cell equals to cell text

  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    Haverhill
    MS-Off Ver
    Excel 2007
    Posts
    3

    A loop if a cell equals to cell text

    I am looking for a VB way of if the active cell is equal to the text "Benefit" then xldown else add borders to the cell (i already have the code for) and then move up one cell.

    This is for a copied over spreadsheet that I only want the values for so all of the formatting I am doing in VB. all is fine untill I get to a section where the amount of rows can be different everytime. My idea is to xldown to the bottom of the column and then work my way back up till U reach the cell with "Benefit". I would like it to stop then and xldown to the bottom. I am a bit rusty on VB so any help would be great.

  2. #2
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: A loop if a cell equals to cell text

    Can you paste your code or upload a sample workbook?
    Don't forget to mark your thread as [SOLVED].

  3. #3
    Registered User
    Join Date
    10-16-2012
    Location
    Haverhill
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: A loop if a cell equals to cell text

    all i have so far is

    Please Login or Register  to view this content.
    I have not even stated a loop yet. but just by doing this I know that the cell with the text Benefit in it does not work.
    Last edited by Cutter; 10-16-2012 at 01:05 PM. Reason: Added code tags

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: A loop if a cell equals to cell text

    @ sabre_slychimp

    Welcome to the forum.

    Please notice that [CODE] tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.

  5. #5
    Registered User
    Join Date
    10-16-2012
    Location
    Haverhill
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: A loop if a cell equals to cell text

    I have managed to find a way of doing it. This checks to make sure the cell text is not called Milestone and then merges two cells together and the moves up one to the next row until it gets to the cell called Milestone.

    Please Login or Register  to view this content.
    I have had to make all the cells hight the same as there could be more text in and it will have to text wrap, but some strange reason the autofit command makes it only one line.

+ 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