+ Reply to Thread
Results 1 to 3 of 3

Auto enter data from cell above on enter

  1. #1
    Registered User
    Join Date
    08-11-2006
    Posts
    6

    Auto enter data from cell above on enter

    Can someone help me with this. I enter lists of number sometimes the same repeatily in column. Like G17 would be 76.2 and G18 and G19 are the same. Can set code to look at the cell above and copy it if no data is entered? We go right to left, our move selection after enter is right, just though this might be helpfull.

    Thanks

  2. #2
    Tom Ogilvy
    Guest

    RE: Auto enter data from cell above on enter

    sub AddValues()
    dim rng as Range, cell as Range
    On error resume next
    set rng = columns(7).SpecialCells(xlblanks)
    On Error goto 0
    if not rng is nothing then
    rng.FormulaR1C1 = "=R[-1]C"
    for each cell in rng
    cell.formula = cell.value
    Next
    end if
    end Sub

    --
    Regards,
    Tom Ogilvy

    "GSXR1000" wrote:

    >
    > Can someone help me with this. I enter lists of number sometimes the
    > same repeatily in column. Like G17 would be 76.2 and G18 and G19 are
    > the same. Can set code to look at the cell above and copy it if no data
    > is entered? We go right to left, our move selection after enter is
    > right, just though this might be helpfull.
    >
    > Thanks
    >
    >
    > --
    > GSXR1000
    > ------------------------------------------------------------------------
    > GSXR1000's Profile: http://www.excelforum.com/member.php...o&userid=37398
    > View this thread: http://www.excelforum.com/showthread...hreadid=570825
    >
    >


  3. #3
    Registered User
    Join Date
    08-11-2006
    Posts
    6

    Auto fill a cell with data from the cell above

    I thank you for the code but can not make it work. I am a novice for the most part. I can change things somtimes to get results. I have already some code in my sheets to advance to other cells. I don't know it this will cause a problem. Here is what I have now, I have attached a zip file of part the worksheet. What I am doing now is jumping from part name cell to the material cell because the part number is an =if. Then we jump from the per cell back to the part name cell to start another line. What I would like to do is have values in the width(G) column and length(H) column be copied to the cell below on enter if no value is entered in the cell below. So if in row 01 width was 50 and in row 02 the width was going to be 50 I would like to be able to just enter and the same with the length(H) column. But be able to enter a different value also that would be the next value to be the copied value. The cell above should always be the hot cell for lookup. I hope this is not to long winded, I just trying to get acrossed what I am trying to do. Thanks everybody for the help.


    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim endCol As Range, startCol As Range
    Set endCol = Range("m:m")
    Set startCol = Range("B:B")
    If Not Application.Intersect(endCol, Range(Target.Address)) Is Nothing Then Cells(ActiveCell.Row + 1, startCol.Column).Select
    Dim endCell As Range, startCelll As Range
    Set endCell = Range("b:b")
    Set startCell = Range("d:d")
    If Not Application.Intersect(endCell, Range(Target.Address)) Is Nothing Then Cells(ActiveCell.Row, startCell.Column).Select
    End Sub
    Attached Files Attached Files

+ 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