Checking values in the column with IF statement and copy it to another sheet

  • Hello to all,

    I am working on a project that you have measurement results on the sheets and on the main sheet you can see these results with combobox selection.

    I tried to do something but I have compile error 1004 message


  • Hello,


    If you are getting a compile error 1004 message at the line #10 ...


    it probably means the worksheet name added in the TextBox1 does not match a worksheet name in your file ...


    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • This is the project excel.


    My goal is this,


    Get the values (A19:A41) from the selected sheet which is in the Combobox on Sheet1.

    and check that if

    * it is < 999 then paste the cell value to Sheet1 K9 and paste "Hz" to Sheet1 L9.

    *it is > 999 then divide the cell value by 1000 and paste it to Sheet1 K9 and write "kHz" to Sheet1 L9.


    and this will be applied to all rows between (A19:A41).

  • Thanks for your file :)


    It does make things much much easier ...!!!


    As soon as I have a moment, will look for a solution ...;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Hello again,


    You could test following modification


    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

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