+ Reply to Thread
Results 1 to 3 of 3

Excel VBA for if less than, greater than value and paste in new sheet

  1. #1
    Registered User
    Join Date
    06-28-2012
    Location
    X
    MS-Off Ver
    X
    Posts
    2

    Excel VBA for if less than, greater than value and paste in new sheet

    Hello people,

    Basically I want to create a macro that basically checks if there exist a value in the row and compare it to a limit value in one of the cell . If there exist value greater than the limit value (Grenzwerte) and paste the whole row while maintaining months and year integrity in a new sheet and then it goes to the next set of row checks again and then paste it in another row not overwriting the previous. until it reaches the end.

    Thanks.

    Below is the actual file

    Test.xls
    Kevin

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel VBA for if less than, greater than value and paste in new sheet

    Hi,

    The first difficulty is that your data is not consistent. You have a mixture of real numbers and text like <0.05 in columns E,G&H

    If you can have them all entered as true numbers then you can use a helper column to test whether the number is > the maximum. Once you have this helper column you can use it in an AutoFilter and once filtered you can copy the filtered rows to another sheet.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    06-28-2012
    Location
    X
    MS-Off Ver
    X
    Posts
    2

    Re: Excel VBA for if less than, greater than value and paste in new sheet

    Thank you for the feedback, for this time just ignore the operators and text and assume just the number. Now I want to create a macro probably in VBA that does the abovementioned. This is so that I can make a control box and apply accordingly if values are under or above the reference limit.

    It is also worth mentioning that this table has to be scalable in the future and the vba code must check for all cells in the row for different months/year.
    Last edited by kevinloh; 06-28-2012 at 09:04 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1