Solved Excel Table - New Entries Always at the Top Row

June 4, 2020 at 13:13:08
Specs: Windows 8
I want my Excel table to leave the first row blank everytime I add my sales for the day, so the new information is always on top. Is this possible?

See More: Excel Table - New Entries Always at the Top Row

Reply ↓  Report •

✔ Best Answer
June 5, 2020 at 06:41:53
The following macro may fit your needs. I created a table with a Header row.

If I select any cell in the Table and run the code, a Row is inserted below the Header row and the rest of the table moves downward. Let me know if this fits your need.

Sub AddRowAtTop()

    Selection.ListObject.ListRows.Add (1)

End Sub

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code



#1
June 4, 2020 at 14:54:31
You do know about "Right -Click...Insert Row", right?

Is that not what you want to use?

message edited by DerbyDad03


Reply ↓  Report •

#2
June 4, 2020 at 14:58:21
Like so many other things people ask about, I don't have
any recent experience with Excel, so I can't say how it is
done, but you could try looking for "most recent on top" or
"order by date" or "organize by date". Two other terms
that almost certainly won't help, even though they describe
pretty much the same thing, are "push down stack" and
"first in first out".

Ah-- What DerbyDad said.

-- Jeff, in Minneapolis

message edited by Jeff Root


Reply ↓  Report •

#3
June 4, 2020 at 15:23:05
Im just wondering if there's a way it could be done without me inserting a row. Instead of expanding the table downwards, it expands upward.

message edited by ChGatsby


Reply ↓  Report •

Related Solutions

#4
June 4, 2020 at 15:28:12
Try these links...

https://tinyurl.com/y7o87r7g

https://tinyurl.com/ycc2l42b

Possibly the second one is more specific to your search?


Reply ↓  Report •

#5
June 4, 2020 at 17:45:47
It could probably be done with a macro, but I'd need some more specifics, especially what you mean by "Instead of expanding the table downwards, it expands upward."

It that because of where the table is located? More details would help.

Your work process might help too. Such as how you enter the data, last cell the data is entered into, does it ever change once it's entered, etc.

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code

message edited by DerbyDad03


Reply ↓  Report •

#6
June 5, 2020 at 06:41:53
✔ Best Answer
The following macro may fit your needs. I created a table with a Header row.

If I select any cell in the Table and run the code, a Row is inserted below the Header row and the rest of the table moves downward. Let me know if this fits your need.

Sub AddRowAtTop()

    Selection.ListObject.ListRows.Add (1)

End Sub

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code


Reply ↓  Report •

#7
June 5, 2020 at 08:19:27
Wow, is that ever simple! It's like the functions I wrote for
my Commodore Plus 4 more than 30 years ago, which was
missing some basic functions like a true "delete" key.

-- Jeff, in Minneapolis


Reply ↓  Report •

Ask Question