+ Reply to Thread
Results 1 to 11 of 11

Help: How do I fill a selected row with data?

  1. #1
    Registered User
    Join Date
    11-10-2005
    Posts
    14

    Exclamation Help: How do I fill a selected row with data?

    Hello,

    How would I fill a selected row that has empty cells with values of zeros? Also, how would I search for a row filled with zeros and delete it? Both is necessary...any ideas?

    Thank you!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Try this technique:

    •Select the range of cells to be tested for blanks
    •From the main menu: Edit>Go To (or press the [F5] key)
    •Click the [Special Cells...] button
    •Select Blanks and Click OK
    That should select all blank cells in the tested region.

    •Type a 0 (zero)
    •Hold down the [Ctrl] key and press [Enter]
    That will put a zero in every selected cell.

    Does that help?

    Regards,
    Ron

  3. #3
    Tom Ogilvy
    Guest

    Re: How do I fill a selected row with data?

    Do you mean all 256 cells in a row?

    If you mean filled with zero's, do you mean all 256 cells are filled with
    zero. If not, do all cells contain a number or are blank?

    If blank are the cells actually empty, or do they contain formulas that may
    make the cell appear blank?

    Do the cells contain formulas?

    --
    Regards,
    Tom Ogilvy



    "limshady411" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hello,
    >
    > How would I fill a selected row that has empty cells with values of
    > zeros? Also, how would I search for a row filled with zeros and delete
    > it? Both is necessary...any ideas?
    >
    > Thank you!
    >
    >
    > --
    > limshady411
    > ------------------------------------------------------------------------
    > limshady411's Profile:

    http://www.excelforum.com/member.php...o&userid=28711
    > View this thread: http://www.excelforum.com/showthread...hreadid=484850
    >




  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Regarding the deletion of rows with all zeros:

    Method 1:
    •Data>Filter>Autofilter
    •Set every col criteria to 0 (zero)
    •Select the displayed cells
    •Edit>Delete
    Excel will only allow you to delete entire rows in autofiltered lists
    •Data>Filter>Autofilter (to remove the autofilter)

    Method 2:
    •Create a helper column to the right of the data with this formula, assuming your data is in columns A through E:
    =COUNTIF(A2:E2,0)=5
    •Copy that formula down as far as needed
    •Now, use the same Autofilter technique as above, but only set the critera on the helper column

    Does that help?

    Regards,
    Ron

  5. #5
    Al
    Guest

    RE: Help: How do I fill a selected row with data?

    Block the cells, then enter "0" in the first one and press CTRL+ENTER

    The second part sounds like a macro to me. Maybe someone else can offer
    suggestions.


    "limshady411" wrote:

    >
    > Hello,
    >
    > How would I fill a selected row that has empty cells with values of
    > zeros? Also, how would I search for a row filled with zeros and delete
    > it? Both is necessary...any ideas?
    >
    > Thank you!
    >
    >
    > --
    > limshady411
    > ------------------------------------------------------------------------
    > limshady411's Profile: http://www.excelforum.com/member.php...o&userid=28711
    > View this thread: http://www.excelforum.com/showthread...hreadid=484850
    >
    >


  6. #6
    Registered User
    Join Date
    11-10-2005
    Posts
    14
    Hi all,

    Well, not all the cells I suppose. I really only need from A - X. Right now now, I find the last cell used in a column, move down 1 cell, and then I select the entire row so that I can fill these with a zero. However, I only need A - X filled, but I was thinking that it might be easier if we just filled the entire row. Whatever is easiest for you all. Any help would be appeciated. Right now I have this:

    Please Login or Register  to view this content.

    Thanks all!

  7. #7
    Registered User
    Join Date
    11-10-2005
    Posts
    14
    Also, there are no formulas, just data. Thanks!

  8. #8
    Tom Ogilvy
    Guest

    Re: Help: How do I fill a selected row with data?

    Range("A65536").End(xlUp).Cells(2, 1).Select
    Selection.Resize(1,24).Value = 0


    Possibly for eliminating cells with all zero:

    Range("A65536").End(xlUp).Select
    for i = selection.row to 2 step -1
    if application.Sum(cells(i,24)) = 0 then
    rows(i).Delete
    end if
    Next

    --
    Regards,
    Tom Ogilvy


    "limshady411" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Also, there are no formulas, just data. Thanks!
    >
    >
    > --
    > limshady411
    > ------------------------------------------------------------------------
    > limshady411's Profile:

    http://www.excelforum.com/member.php...o&userid=28711
    > View this thread: http://www.excelforum.com/showthread...hreadid=484850
    >




  9. #9
    Registered User
    Join Date
    11-10-2005
    Posts
    14
    Thanks Tom. The zeros work great. Thanks. For the delete, it erases all my rows...

  10. #10
    Tom Ogilvy
    Guest

    Re: Help: How do I fill a selected row with data?

    guess there was a typo, Try it this way

    Sub AABB()
    Range("A65536").End(xlUp).Select
    For i = Selection.Row To 2 Step -1
    If Application.Sum(Cells(i, 1).Resize(1, 24)) = 0 Then
    Rows(i).Delete
    End If
    Next

    End Sub



    --
    Regards,
    Tom Ogilvy

    "limshady411" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Thanks Tom. The zeros work great. Thanks. For the delete, it erases all
    > my rows...
    >
    >
    > --
    > limshady411
    > ------------------------------------------------------------------------
    > limshady411's Profile:

    http://www.excelforum.com/member.php...o&userid=28711
    > View this thread: http://www.excelforum.com/showthread...hreadid=484850
    >




  11. #11
    Registered User
    Join Date
    11-10-2005
    Posts
    14

    Thumbs up

    This definately does the trick! Thanks Tom!!! (Thanks for your help too Ron and Al).
    Last edited by limshady411; 11-14-2005 at 12:38 PM.

+ 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