Copy automatically columns if the criteria is met

[Solved]
Report
-
Posts
2815
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 4, 2021
-
Hello,

I have simple workbook with 2 sheets. Sheet1 contains columns "Risk ID", "Risk" and "Response". Data would be for example ID1, "Cyber attack", and "Mitigate". I want to copy this information into Sheet 2, but only when "Response" is "Mitigate". If there is something another, like "Accept" the whole data row should be jumped and not copied into Sheet2. Can can I do this without any VBA code?


System Configuration: Windows / Chrome 91.0.4472.114

1 reply

Posts
2815
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 4, 2021
484
Hi Kerwin,

Why not use VBA? It would be the best and easiest way.

If you really want to use formula's I guess you could use:
Sheet2 A2: =IF(Sheet1!$C2="Mitigate",Sheet1!A2,"")

Drag the cell to C2, then select A2 to C2 and drag that selection down.

On sheet2 you can apply an autofilter (found on the data ribbon) to get the data next to each other, without empty rows in between.

Best regards,
Trowa