Home » excel » excel – Trying to get this so that the Text will go to the next line under the last line of the table

excel – Trying to get this so that the Text will go to the next line under the last line of the table

Posted by: admin April 23, 2020 Leave a comment

Questions:

I’m trying to figure out how to put the information below the bottom line in the excel sheet. Here’s what I have:

Cells(Rows.Count, 1).End(xlUp).Value = "test"

However that replaces the current last line with “test” but I need it to be the next line.

How would I go about this?

How to&Answers:

Try

Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Value = "test"

Here’s the code in my macro

Sub SetTestValue()
    Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Value = "test"
End Sub

and here’s the output

enter image description here