Results 1 to 10 of 75

Thread: vba Copy Paste Conditional to put remark 1 2 3 .. etc

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    Problem is possibly your understanding of English language.

    __ < is less than
    __ > is greater than




    If arrS1(cnt, 11) > arrS2(cnt, 5) Then ----- If column K is Greater than column E Then
    If arrS1(cnt, 11) < arrS2(cnt, 5) Then ----- If column K is less than column E Then




    3 is greater than 2
    2 is less than 3
    3 is > 2
    2 is < 3

    3 > 2 is True
    3 > 5 is False
    2 < 1 is False
    3 > 5 is False




    Code:
          Case "SELL" 'If column I is sell
            If arrS1(Cnt, 11) > arrS2(Cnt, 5) Then ' if column K is Greater than sheet2 of column E then
            ' if column K is Greater than sheet2 of column E then do nothing
            Else
            ' if column K is less than or = to sheet2 of column E then
            Let arrS3(Cnt)(1, UBound(arrS3(Cnt), 2)) = UBound(arrS3(Cnt), 2) - 1 ' Put in a value in last array "column"
            End If
          Case "BUY"  'If column I is buy
           If arrS1(Cnt, 11) < arrS2(Cnt, 6) Then  ' if column K is lower than sheet2 of column F then
           ' if column K is lower than sheet2 of column E then do nothing
           Else
           '  if column K is greater than or = to sheet2 of column E then
           Let arrS3(Cnt)(1, UBound(arrS3(Cnt), 2)) = UBound(arrS3(Cnt), 2) - 1 ' Put in a value in last array "column"
           End If
    



    Molly did understand correct!!

    Vixer, You did explain it wrong!!

    Molly, you did it correct. Vixer explained it wrong. ( He has difficulty with English language )




    This is wrong:
    Quote Originally Posted by fixer View Post
    If column I is sell then see the value of column K & if column K is Greater than sheet2 of column E then put the remark in sheet3 in the stock name from column B
    This is correct:
    If column I is sell then see the value of column K & if column K is less than sheet2 of column E then put the remark in sheet3 in the stock name from column B
    Last edited by DocAElstein; 03-20-2020 at 10:11 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Replies: 26
    Last Post: 09-26-2020, 05:56 PM
  2. VBA -- Copy/Paste across sheets
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 09-21-2012, 02:07 PM

Tags for this Thread

Posting Permissions

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