excel - VBA counter based on date -
I have created a userform to track service requests and I'm having trouble with this last part.
The question has 2 columns, the first "A" is the service id, the second "B" is the date. I should be "B" today's date and "A" starting from 1 and counting, when I add a new request then tomorrow I should start "A" again 1.
Here is the code for column "A", when a new record is created "A" goes up, but when the date changes, it does not start back at 0. Any ideas?
'Check Id of Service ID' if 'Date' then enter '' 1 '', if tomorrow "1" is put out tomorrow then if output 1 if (Sheet 1. Seals (Rows.Count, "B"). End (XLEEP). Value = "Date" Then Servicar = "1" Elsef (Sheet 1.Calz (Rays.Count, "B"). End (XLEP ).) Date again Servicar = "1" Elsef (Sheet 1.close (rows.quote, "B"). End (XLEP) .Voluez) = Date again Servicers = (Sheet1. Sales (rows.account, "A"). End (XlUp). Value) + 1 Or End If Thank you in advance.
Why not only column A a COUNTIF formula to show the number of dates in that column B cell In this way, when the date changes, it will automatically reset 1 and every new time the request will be filed the same day, it will increase with ID 1. The VBA formula will be:
Of the Health SheetlkCells (Panktiyakkount, "A"). End (Akselipi) Kofset (1). Formula = "= COUNTIF (B: B, B" & amp; ROU and ")" 'Delete this next line if you want to include column A instead of sources' If you do not repeat it, make sure that you already put the date in the B column for this entry Have given'. Value =. With value
Comments
Post a Comment