Copy contents based on a criteria (Cell value) using VBA

deepakdgl

New Member
Joined
May 19, 2017
Messages
5
Hi all,
I have a below requirement. (Please view image before reading further). Requesting your support.

GCyJnZW.png
https://pasteboard.co/GCyJnZW.png

1) The macro should check cells A1,C1,E1,G1,I1 and find the most advanced phase. (These cells can hold any values Phase 1 to Phase 5. Two or more cells can hold the same value too.). Phase 5 is most advanced.
2) Based on the most advanced phase, the macro should copy the respective contents and paste it. eg: In the Image,Phase 5 is advanced (Cell I1), it should copy cells E5:E14 and paste it on H5:H14.

Another example:
If A1=C1=E1=Phase 2 and G1=I1= Phase 1, the macro should copy cells B5:B14 and paste on cells H5:H14 since phase 2 is advanced.

Thanks in advance,
Deepak
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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