+ Reply to Thread
Results 1 to 6 of 6

How to make Excel VBA to skip blank cells until a cell has a number

  1. #1
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    136

    How to make Excel VBA to skip blank cells until a cell has a number

    I have attached a spreadsheet and will need help in writing a code that will check the values in Column F and and Col C. The answers to what I need is the in column G (yellow).

    Example if col C is 0, it should be blank on G, otherwise if Col C is 1, it should look for the next value in F and return the value , and the rest should be blank. Just like the way I specified it in the spreadsheet.
    Any help is appreciated.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-10-2013
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to make Excel VBA to skip blank cells until a cell has a number

    You can use the "IF" formula in column G to represent this.

    eg: IF(C2=0,"", insert your column G formula here) will provide a blank index (double quote marks do this).

  3. #3
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: How to make Excel VBA to skip blank cells until a cell has a number

    I want the VBA code to check the conditions of columns F and C and if the conditions are met then return the answer in column G. I have attached a spreadsheet to show you what I need.
    For example: you can see that G10, G11, and G12 have values of 1.5 because in column C, C10, C11 and C12 has 1 as the number, the rest should be blank and the first condition should stop there and the next condition should start. I have the answers in the spreadsheet, I want to know how I can put that in a code

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to make Excel VBA to skip blank cells until a cell has a number

    Please Login or Register  to view this content.
    Last edited by Solus Rankin; 12-11-2013 at 06:23 PM.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  5. #5
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: How to make Excel VBA to skip blank cells until a cell has a number

    Solus...you nailed it...thanks a lot!!!

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to make Excel VBA to skip blank cells until a cell has a number

    Glad to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel 2007 : Skip Blank Cells While Copying A List
    By shruthitulsi in forum Excel General
    Replies: 8
    Last Post: 03-02-2015, 05:32 PM
  2. Replies: 4
    Last Post: 04-09-2012, 12:06 PM
  3. I want to copy a formula n Excel but skip any blank cells
    By Ann in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2005, 03:00 PM
  4. formula(excel) to skip cells having - number and add + one
    By anthonylaw in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-25-2005, 02:05 PM
  5. [SOLVED] formula in excel to skip cells having - number and add only +
    By anthonylaw in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-25-2005, 02:05 PM

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