+ Reply to Thread
Results 1 to 7 of 7

Macro - Ignore Cells with a value in?

  1. #1
    Registered User
    Join Date
    11-16-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    34

    Macro - Ignore Cells with a value in?

    Hi there,

    I'm currently using a macro to determine what information is missing. However, the macro I'm using is overwriting all values. Is there anyway I can get it to ignore cells that have a value in? I've attached an example spreadsheet with the code I'm using.

    Below is the code I'm using:

    Please Login or Register  to view this content.
    Thank you in advance for the help!
    Attached Files Attached Files
    Last edited by revenge4ash89; 12-09-2011 at 12:17 PM.

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: Macro - Ignore Cells with a value in?

    read the rules, then alter your post accordingly
    _______________________________________________
    Remember:

    Read the rules!

    Use code tags! Place [CODE] before the first line of code and [/CODE] after the last line of code.

    Mark your post [SOLVED] if it has been answered satisfactorily.
    To do this, click EDIT in your original post, click GO ADVANCED and set the PREFIX. It helps everybody!

    If you are approve (or disapprove) of any members response to your problem, please click the star icon underneath their post and comment. It matters.

  3. #3
    Registered User
    Join Date
    11-16-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Macro - Ignore Cells with a value in?

    Sorry, my brain is fully functioning today - Friday feeling I guess. I've corrected the post
    Last edited by revenge4ash89; 12-09-2011 at 09:10 AM.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Macro - Ignore Cells with a value in?

    You can use -
    Please Login or Register  to view this content.
    While looking through your code, i find that you have repeated the same line over and over again and incremented by 1. Your code can be structured better if you explain your requirement...and we can help you out.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Registered User
    Join Date
    11-16-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Macro - Ignore Cells with a value in?

    Hi Arlu,

    I think I've over complicated it, but basically I just wanted it to post "information required" in column B - S if there is a value in column A. However, I don't want "information required" to overwrite a cell if it already has a value in.

    Sorry if that's unclear, I'm very new to this programming language as you can tell.

    Thanks for the help!

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Macro - Ignore Cells with a value in?

    I changed your code to the below - Only the initial loop.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-16-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Macro - Ignore Cells with a value in?

    Arlu that works absolutely perfectly!!! Thank you so much for the help, I can't tell you how much I appreciate it!

+ 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