if any row in column J that = ATO then I need every row in column O to populate "Automated". Also if any row in column J = PRD and any row in column L = "waiting" then I need every row in column O that satisfies both criteria to = "Manual".
Thank you for your response. I am looking for a VBA code because there is a report that I run daily, and the amount of data differs. I am tasked with automating this and have already coded a lot of data based on similar conditions. Since the rows change I need to hard code a VBA formula into a macro to auto populate this. Can I do that with the IF statement or would I have to copy and paste this every time? My goal is to set a formula so I run the macro and do not have to manually enter anything. Any help with a VBA code would be very much appreciated.
Sub MM2()
Dim lr As Long
lr = Cells(Rows.Count, "J").End(xlUp).Row
Range("O2:O" & lr).Formula = "=IF(J2=""ATO"",""Automated"",IF(AND(J2=""PRD"",L2=""waiting""),""Manual"",""""))"
End Sub
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.