excel 2019- IF Cell Contains Text Then Copy to Another Sheet automatically

ShaluaR

New Member
Joined
Nov 9, 2021
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I'm trying to create an excel spreadsheet (version 2019 and no ability to upgrade to 365) to keep track of appointments.

There are sheets for each month. And I need the appointments for future dates to show up in their respective monthly tab automatically (without disappearing from the original one).
I have attempted to create a VBA module but the problem I hit is that every time I ran the macro, the information copied over and over. Also, my "If status" only covered one month and I don't know how to cover more months and was trying to avoid creating a macro for each month.

Below is what I came up with from a tutorial I watched but like I said it came short for my needs. Is there a way to replicate the excel 365 recently introduced Filter formula? I think that's what I would need- but again, not sure
Sub CopyOverNextMonthMeetings()

Dim StatusCol As Range
Dim Status As Range
Dim PasteCell As Range

Set StatusCol = Sheet1.Range("E2:E20")

For Each Status In StatusCol

If Sheet2.Range("A2") = "" Then
Set PasteCell = Sheet2.Range("A2")
Else
Set PasteCell = Sheet2.Range("A1").End(xlDown).Offset(1, 0)
End If

If Status = "Next Month Feb" Then Status.Offset(0, -4).Resize(1, 5).Copy PasteCell


Next Status

End Sub

I would appreciate your help with this issue.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

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