Macro in Excel with IF function copying and transferring formats

reza53

New Member
Joined
Nov 13, 2017
Messages
1
[h=2][/h]
Hi,
I need a Macro in Excel with IF function. Basically the Macro goes through the first row of WS1. IF there is "Charlie" in A1:A3 (merged cells) the Macro will copy the range F2:H6 from WS2 and paste it below "Charlie" in WS1. IF there is "George" in A1:A3 (merged cells) the Macro will copy the range I2:K6 from WS2 and paste it below "George" in WS1. The Macro will then move to the next position A4:A6 (merged cells) and fills the cells below it based on similar information from WS2, and will continue for "Michael", "James" and ...
The copied cells contain hyperlinks, so I need the formats transferred too.
Please help me with that or guide me if a similar answer exists. Thanks​
 

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,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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