last used row in column C equals last used row in column E
Results 1 to 10 of 10

Thread: last used row in column C equals last used row in column E
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Aug 2019
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default last used row in column C equals last used row in column E

    Hello everyone, I could use some help in finding last used rows. If C1 is >0, I need the last used row in column C to equal last used row in column E.

    thanks

  2. #2
    Board Regular
    Join Date
    Mar 2016
    Posts
    157
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    When do you want this to happen? Automatically whenever the value in C1 changes?

    Let's say that C1 > 0 and that column C uses rows 1-15 and column E uses 1-10, do you simply want to delete C11-C15?

    What if C uses rows 1-5? Do you want to add values to C6-C10?

  3. #3
    New Member
    Join Date
    Aug 2019
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    if I understand your question correctly, the columns will be the same length

  4. #4
    Board Regular
    Join Date
    Mar 2016
    Posts
    157
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    Are you asking to make sure that if C1 > 0, then set the value of C10 the same as E10 (assuming that these are the last cells in the columns)?

  5. #5
    New Member
    Join Date
    Aug 2019
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    that is correct

  6. #6
    Board Regular
    Join Date
    Mar 2016
    Posts
    157
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    Put this in the worksheet's code area.

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
        If Target.Address = "$C$1" Then
            If Target.Value > 0 Then
                Cells(Rows.Count, 3).End(xlUp).Value = Cells(Rows.Count, 5).End(xlUp).Value
            End If
        End If
    End Sub

  7. #7
    New Member
    Join Date
    Aug 2019
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    thank you, the code worked fine.

  8. #8
    New Member
    Join Date
    Aug 2019
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    can the code be modified so it is a regular formula versus worksheet change event?

  9. #9
    New Member
    Join Date
    Aug 2019
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    i think the formula should look like this in B1 =if($C$1=0,c1&lr,(C1&LR =E1&lr)

  10. #10
    Board Regular
    Join Date
    Mar 2016
    Posts
    157
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)

    Default Re: last used row in column C equals last used row in column E

    I don't know what your values are in columns C & E, but to have a formula control the values, the cells in C have to be formulas.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •