VBA code errors

  • Hello Guys


    I need your help urgently. i am very new to VBA so please forgive me if i ask any noob question. I have written a small VBA code as below. I am getting error Run-time '1004': Method Range of object worksheet fail on the row If ws.Range("B") = "Fail" Then. Please check what i have done wrong in the code and how can i get the desired result


    What i am trying to achieve with the code is


    I have multiple excel sheets in one workbook. let says sheet1, sheet2 and so on... I also have one sheet "SNAGS"


    I have three columns in each sheets except SNAGS Sheet(Description, Result and Notes)



    so for each description user can either put pass or fail in result column. What i want to do is in the whole workbook if any cell has a value "Fail", the corresponding value of description cell should be copied in a sheet "SNAGS.



  • crossposted: https://chandoo.org/forum/thre…r-cell.40069/#post-239619


    Your post does not comply with our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.


    Post a link to any other forums where you have asked the same question.


    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.


    Go to https://www.excelguru.ca/content.php?184 to understand why we ask you to do this.


    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!