+ Reply to Thread
Results 1 to 14 of 14

Need to add skip blank cells to my code

  1. #1
    Registered User
    Join Date
    12-21-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    42

    Need to add skip blank cells to my code

    Here is my current invoice sheet.
    It looks through my customer list, when it sees a cell with red text, it places that amount into the invoice before printing.
    My problem is that currently if the cell is set to red text but bank, the code sees this and puts the month into the invoice with a blank cell.

    I would like to add something to look over blank cells that are formatted for red text.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Need to add skip blank cells to my code

    add an AND condition like
    Please Login or Register  to view this content.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    12-21-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Need to add skip blank cells to my code

    dear hemesh

    I tried adding as you suggested and went to debugging on that line

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Need to add skip blank cells to my code

    Can you please upload a sample book

  5. #5
    Registered User
    Join Date
    12-21-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Need to add skip blank cells to my code

    Test 1.xls
    sure currently I'm working on the Single_Invoice_Sheet I will change the other invoice sheet after I get the code fixed. If you play with the other invoice sheet you can see where the problem is currently

  6. #6
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Need to add skip blank cells to my code

    Hey Got it, it is targrow and I typed Targetrow! you need to check 2 conditions
    1. cells is complete blank
    2. cells is having a value of i.e. not equal to 0
    try below
    Please Login or Register  to view this content.
    Last edited by hemesh; 02-11-2014 at 04:17 PM.

  7. #7
    Registered User
    Join Date
    12-21-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Need to add skip blank cells to my code

    That works great on the single_invoice_sheet

    When added that part of the code to my invoice sheet it works as planned BUT if the customer owes more then 6 months the invoice no longer goes into

    your account is in arrears

    Also message box pops up and it has to be clicked ok 5 times

    First part of the code works the second part is where I get the problems

    Original Code
    Please Login or Register  to view this content.
    Your mod Code
    Please Login or Register  to view this content.
    Last edited by Garbology; 02-11-2014 at 04:52 PM.

  8. #8
    Registered User
    Join Date
    12-21-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Need to add skip blank cells to my code

    dear hemesh

    sorry I just replaced my original code with the actual original one. The invoice sheet does not work right
    your account is in arrears does not work

    Also message box pops up and it has to be clicked ok 5 times on both halfs of the invoice

  9. #9
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Need to add skip blank cells to my code

    Please Login or Register  to view this content.
    Msgbox should be outside the next loop else every time it will pop up when value is greater than 21
    you will not get the msgbox activated coz k is maximum 20 reason your values are only upto 10 column

  10. #10
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Need to add skip blank cells to my code

    Find Sheet Attached in sum I have added some values for Terry ! Msgbox will pop up but for others it will not
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-21-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Need to add skip blank cells to my code

    Correct that works as planned in the Single_Invoice_Sheet

    The issue now lies inside of the Invoice sheet, that was the code I posted.
    Currently right now that page has the original problem that I started this post about.
    When I added your part of the code into the original code it where I started having problems.

  12. #12
    Registered User
    Join Date
    12-21-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Need to add skip blank cells to my code

    Well I played around adding that string of code into different parts of my original code and came up with something that is working currently I'm going to play with it a little more to make sure things are correct but I think this is going to work

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    12-21-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Need to add skip blank cells to my code

    This problem is solved, Now I'm having some problems with my print all invoice macro, but I don't think it has anything to do with this code I think the problems lies into the print all invoice macro itselft

  14. #14
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Need to add skip blank cells to my code

    Thanks for the feedback!

+ 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. Replies: 4
    Last Post: 06-27-2013, 11:31 AM
  2. [SOLVED] Skip Section of Code if Filter Returns a Blank
    By tamiso2311 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-11-2013, 12:53 AM
  3. Skip blank cells
    By kenjiventurina in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2012, 02:52 AM
  4. skip blank cells
    By Seroleh in forum Excel General
    Replies: 16
    Last Post: 05-28-2009, 02:21 AM
  5. Skip Blank Cells
    By belly0fdesire in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-08-2006, 02:21 AM

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