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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,214,801
Messages
6,121,644
Members
449,045
Latest member
Marcus05

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