VBA macro expert

LebD

New Member
Joined
Sep 30, 2021
Messages
34
Office Version
  1. 365
Platform
  1. Windows
Hello
I need to write a macro code for excel that does the following:

You have data in columns A to F like the pic
Macro should be able to check whether the column I choose (in this example column A) has the same name in different rows, then condition filled, it will check the column I designate (in this example column B for availability but can be column 5 or another).

If B = busy, it will copy paste the row from A to F into column G
If B= available, it will copy paste the row from A to F into column M

The order of which row section should be first and the other row with same name should be second or third, depends on the date in column E. the earlier (older) should be first in the row.
 

Attachments

  • testing.png
    testing.png
    24.7 KB · Views: 41
it could be a code with Date and Subsequent Dates
 
Upvote 0

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,824
Messages
6,121,784
Members
449,049
Latest member
greyangel23

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