+ Reply to Thread
Results 1 to 3 of 3

Looping through columns on the same row, changing cell values to NULL

  1. #1
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Looping through columns on the same row, changing cell values to NULL

    Hi,

    How should the syntax go? I would like to look through a range first. And if the cells(target.row, 1).value = vbNullString then, I want all subsequent values on the same row in all columns to be "". There is a total of 26 columns.

    code segment is: If I have 100 columns, then I would need to write 100 lines....which is not very efficient.

    Please Login or Register  to view this content.
    Thanks for your input
    Last edited by Lifeseeker; 12-29-2011 at 11:57 PM.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Looping through columns on the same row, changing cell values to NULL

    Hi there,

    Try this:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Looping through columns on the same row, changing cell values to NULL

    Quote Originally Posted by Trebor76 View Post
    Hi there,

    Try this:

    Please Login or Register  to view this content.
    Regards,

    Robert

    Perfect, and it works!

    Thanks

+ 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