Hi all,
Since a couple of days i've completely lost myself in the wonderful world that is excel. I’m a complete beginner but have come a long way already, but now I’ve encountered the limits of my skills. I tried searching the forum but really couldn't find my question, and also on google and youtube it doesn't seem like a common topic unfortunately. So i've got all my hopes on this excel-lent (hah!) forum!
I’m making a sheet to track the time I work for different clients and on different projects, and this sheet will fill up with up to a dozen or so data entries each day. To prevent endless scrolling down, I want the top row to remain blank at all times – available for filling in new entries and somehow moving down after having been filled. I’ve figured out how to auto insert an entire blank row with a bit of VBA code I found in a youtube video, but the problem is that this newly inserted blank row is … blank. And I have multiple columns with formulas at the end of the row that need to stay in place (calculating total time worked for that entry, and time worked excluding breaks, but also a column with costs and profit, and then average profit per hour worked).
MY QUESTION: is there a way to either a) only move down the information in the first couple of columns, and not the entire row? Or b) a way to automatically apply the formulas to the new blank row that is inserted at the top after entering a new row of information?
Next to that I’m also trying to build some efficient and flexible tool to analyze and overview the time I worked for certain jobs, certain clients or specific projects and in specific time period. I was having some early success with this, but soon noticed I couldn’t leave criteria open and see the results. The SUMIFS formula apparently needs all criteria to be given for it to function and give a result. Is there a way to work around this? Otherwise I’d have to create multiple search tools; 1 tool for when im looking with only 1 criteria, another tool when im searching with 2 criteria et cetera. The examples I have of this are above the main table with data entries, to the right (there’s some further explanation I wrote in red there).
The yearly and quarterly overviews at the top are left blank, because I wanted to know if what im trying to do is possible at all first (otherwise this entire excel sheet will be so much less attractive)
Thanks a lot for any help in advance!
ps.
Somehow I got a warning about macros when trying to open the example sheet I made, and after that the VBA didn’t work anymore. So I’ll just post it here if anyone needs a more lively example of what I got so far. To clarify: this VBA can insert an entire new row after filling in and pressing enter on the “until” cel in G15.
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 7 Then
If Target.Cells.Row = 15 Then
N = Target.Cells.Row
If Range("E" & N).Value <> "" Then
Range("E15").EntireRow.Insert
Range("A15").Select
End If
End If
End If
enditall:
Application.EnableEvents = True
End Sub
Bookmarks