+ Reply to Thread
Results 1 to 9 of 9

Finding non blank cell in therange of columns (B to the right end) and replac with

  1. #1
    Registered User
    Join Date
    01-05-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    6

    Finding non blank cell in therange of columns (B to the right end) and replac with

    I am having data in first column, but want to copy any non blank cells of the row with the data in the first column for that ROW

    and continue for all the rows down till the end

    please help

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520
    Would suggest uploading a sample workbook of you data before and show results that you expect after macro is run.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    01-05-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Finding non blank cell in therange of columns (B to the right end) and replac with

    thanks Mike

    attached is the file

    i was expecting the macro to replace all zero(non blank cells in the row) with the first cell in the row

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Finding non blank cell in therange of columns (B to the right end) and replac with

    Give this a try

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-05-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Finding non blank cell in therange of columns (B to the right end) and replac with

    Thanks mike

    It is doing but it is copying the column header for all the non-blank cells

    Instead

    I wanted the values in column A to be copied to non-blanks of the row...

    for example cell D2 should be replaced with value from A2
    similarly cell B14 should be replaced with value from A14
    Cell 22 should be replaced with value from A22

    all values from coulmn A should be moved/copied to the non-blank cell to the right of cloumn A

    Thanks

    s

  6. #6
    Registered User
    Join Date
    01-05-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Finding non blank cell in therange of columns (B to the right end) and replac with

    Thanks mike

    It is doing but it is copying the column header for all the non-blank cells

    Instead

    I wanted the values in column A to be copied to non-blanks of the row...

    for example cell D2 should be replaced with value from A2
    similarly cell B14 should be replaced with value from A14
    Cell 22 should be replaced with value from A22

    all values from coulmn A should be moved/copied to the non-blank cell to the right of cloumn A

    Thanks

    s

  7. #7
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Finding non blank cell in therange of columns (B to the right end) and replac with

    Oops, try replacing a(1,ii) to a(i,1)
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    01-05-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Finding non blank cell in therange of columns (B to the right end) and replac with

    is not working

    each non-blank in the row should be replaced by left most cell in the same row
    Thanks
    S

  9. #9
    Registered User
    Join Date
    01-05-2013
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    6

    Thumbs up SOLVED Re: Finding non blank cell in therange of columns (B to the right end) and replac

    SOLVED

    IT WORKED !! Wonderful

    thanks MIKE

+ 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