+ Reply to Thread
Results 1 to 6 of 6

Code not giving the ouptut but syntactically correct

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    10

    Question Code not giving the ouptut but syntactically correct

    Hi,

    Please help with the below code, which removes the blank cells, by replacing
    the values from the below cells to the blank cells, and makes values in sequence for a cloumn.


    Please Login or Register  to view this content.
    Last edited by Veena Anoohya; 02-01-2014 at 01:32 PM.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Code not giving the ouptut but syntactically correct

    It should be:

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.

    Edit: You may want to exit the loop once you find a non-blank cell, so you don't continue all the way till the end

    Please Login or Register  to view this content.
    Last edited by millz; 01-16-2014 at 03:20 AM.
    多么想要告诉你 我好喜欢你

  3. #3
    Registered User
    Join Date
    01-10-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Code not giving the ouptut but syntactically correct

    Quote Originally Posted by millz View Post
    It should be:

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.

    Edit: You may want to exit the loop once you find a non-blank cell, so you don't continue all the way till the end

    Please Login or Register  to view this content.
    Hi Millz,

    Modifying with the above code, the ouput is like-

    Wherever empty cells are there, the values is replaced with the successor.

    I don't want the value to be repeated, instead I want all values to be consecutively
    present without any blanks between them.

    e.g.
    if Input is-

    8
    9


    6
    4




    2
    1

    then outout shoukd be-
    8
    9
    6
    4
    2
    1

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Code not giving the ouptut but syntactically correct

    So you mean to 'delete' blank cells?

    Try this

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-09-2011
    Location
    Newcastle, Australia
    MS-Off Ver
    2003, 2010
    Posts
    54

    Re: Code not giving the ouptut but syntactically correct

    Hi Veena Anoohya

    ... and makes values in sequence for a column.
    Do you mean you want empty cells removed AND sort the remaining populated cells ?

  6. #6
    Registered User
    Join Date
    01-10-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    10

    Thumbs up Re: Code not giving the ouptut but syntactically correct

    Hi Millz,

    Thanks for the code


    Hi GreyGhost,

    Query solved, actually I wanted to delete blank cells.

+ 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. [SOLVED] SUMIF not giving me the correct answer
    By Cathy Brausa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2012, 02:05 AM
  2. [SOLVED] End(xlDwon).Row Not giving the correct value
    By WarEagleWire in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-20-2012, 11:35 AM
  3. Vlookup not giving correct number ?
    By novicetony in forum Excel General
    Replies: 4
    Last Post: 03-30-2010, 04:35 PM
  4. Countif not giving correct number
    By anilkumar.n in forum Excel General
    Replies: 5
    Last Post: 01-06-2009, 03:30 AM
  5. Replies: 0
    Last Post: 09-23-2008, 02:03 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