Calibrations

L

Legacy 436357

Guest
Hi,

I was wondering if someone can help me please. I have a long list of equipment that requires calibrations on different cycles. Some weekly, monthly, semi-annual, and annual. I request some sort of way to automate the process as far as showing what is due.

I would like to attach file example if possible.

Thank you very much,
Bill
 
Could it be done with current month and only post A to I columns? I may put more columns on source sheet but don't want them to be posted on the destination sheet. Also it seems to be adding to the end of the table and not extending the table for some reason.
 
Last edited by a moderator:
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
The code below will only post to columns A to I. It will also do just the current month. Not sure what you mean by this though, "Also it seems to be adding to the end of the table and not extending the table for some reason."

*Edit I just realized what you meant by that, I'll look into it. Didn't realize it was an actual table.

Code:
Code:
Sub CopyNovember()


Dim wsMain  As Worksheet: Set wsMain = Sheets("Main") 'Change sheet to whatever yours is named
Dim wsNov   As Worksheet: Set wsNov = Sheets("November")
Dim AR()    As Variant: AR = wsMain.Range("A3").CurrentRegion.Value
Dim LR      As Long
Dim R       As Range


For i = 2 To UBound(AR)
    If IsDate(AR(i, 1)) Then
        If Month(AR(i, 1)) = Month(Now) Then
            LR = wsNov.Range("A" & Rows.Count).End(xlUp).Row() + 1
            Set R = wsNov.Range("A" & LR).Resize(1, 9)
            tmp = Application.Index(AR, i, 0)
            R.Value = tmp
        End If
    End If
Next i


Set R = wsNov.Range("A3").CurrentRegion
R.RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6, 7, 8, 9), Header:=xlYes


End Sub
 
Last edited:
Upvote 0
It is adding the lines but not extending the table is what I mean. The formatting of the new lines is different than the lines in the table.
 
Upvote 0
I don't know about the table issue. I turned the table on the November sheet to a table object, and in my test workbook, it is extending the table.
 
Upvote 0
Now it is working as far as extending the table but it goes to debug at:

R.RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6, 7, 8, 9), Header:=xlYes
 
Upvote 0
I removed the 2 lines for checking duplicates and it works properly extending the table. I am happy with this result thank you very much.
 
Upvote 0
Yeah, I don't know. I'm not getting that error with the duplicates. You can always do a manual remove duplicates on your table after the code runs. Either way, glad that it is working well enough for you.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

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