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

FROGGER24

Well-known Member
Joined
May 22, 2004
Messages
704
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
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
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
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?
 
Upvote 0
if I understand your question correctly, the columns will be the same length
 
Upvote 0
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)?
 
Upvote 0
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
 
Upvote 0
can the code be modified so it is a regular formula versus worksheet change event?
 
Upvote 0
i think the formula should look like this in B1 =if($C$1=0,c1&lr,(C1&LR =E1&lr)
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,923
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top