Macro to conditionally insert data from one sheet into another

Jyggalag

Active Member
Joined
Mar 8, 2021
Messages
445
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello everybody.

I want to do something rather large, but I am very inexperienced in VBA and would really appreciate some assistance. Please note that I want to do a bunch of things, but if you can just help me with one of them, it would be immensely appreciated!! - Wishlist: @Fluff ? :)

So I have these two data sheets:

Data that I want to extract:

1642778132197.png


Where I want to insert the data:

1642777661734.png


I currently have the two files saved in this test folder --> path link: \\COMPANY.XX5.COMPANY.NET\userdata\47392\home\Documents\macro test

1642777997599.png


I want to create some sort of VBA code that I can attach to a macro, so once I click it, the macro will:
1) Insert Institution Administrator in the grey fields (for example cell "A3") and say "Institution administered by {inserted institution from column Q}
2) Insert Institution name (from column B in the first excel file) in the blue cells (for example cell A11 that says "BOAP" and ONLY take the text before the hyphen, so if it says "BOAP - 50" it should only insert BOAP --> and also make sure that this is done under its respective institution administrator.
3) Insert Institution Name above the blue cells from 2)
4) Insert a black ✓ in the green cells in column B that says "active last 5 days" if the score in column F from the extract data sheet is = 1 and insert nothing if it is = 0
5) Insert Activity name from column P in the extract data sheet into the insert data sheet (so column "D")
6) Finally, it would be nice if this macro could also create new fields, so if I make a new institution administrated by GOODJ or create a new administrator with new institutions being administrated by it, this would automatically be inserted.

I realize that this is a looooot to ask for - so any assistance (even the smallest) is incredibly appreciated from my point of view!! I really want to automate this process somehow through excel and if anybody else have good suggestions, please let me know :)

Please let me know if you want further information or anything else at all! I will respond ASAP.

Kind regards,
Jyggalag
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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