Hello
You may possibly have uploaded the wrong sample pic?
The sample pic does not explain anything…
I think you are having difficulty yourself understanding what you want. I do not think you understand anything about what is going on.
Or
You are almost completely unable to explain anything correctly in English.
This is what Molly’s macro does :-
The conditions which are met are in current macro ( http://www.excelfox.com/forum/showth...ll=1#post12850 ) are these… …
For each row – the two condition is met scenarios….
If column I is SELL then see the value of column K & if column K is less than or equal to column E in sheet 2 then put the remark in sheet3
If column I is BUY then see the value of column K & if column K is greater than or equal t column F in sheet 2 then put the remark in sheet3
The remark will be in series like 1,2,3,4,5,6 …… and so on. So the remark in column B will always be 1. The remark in column C will always be 2 … and so on
Currently, if the condition is not met then ‘ Nothing is done
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 ' do nothing - Nothing is done - column K is Greater than column E of sheet2 ElseCode: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 ' do nothing - Nothing is done - column K is lower than column F of sheet2 Else
We can only make guesses at what you might want…
‘ Condition not met ... clear the data from column B till the end of the data in that entire row
Code:Select Case arrS1(cnt, 9) ' column I Case "SELL" 'If column I is SELL If arrS1(cnt, 11) > arrS2(cnt, 5) Then ' if column K is Greater than column E of sheet2 Then ' Condition not met ... clear the data from column B till the end of the data in that entire row Ws3.Range("B" & cnt & ":B" & CL(Lc) & "").ClearContents Else ' Condition is met 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 column F of sheet2 Then ' Condition is not met ....clear the data from column B till the end of the data in that entire row Ws3.Range("B" & cnt & ":B" & CL(Lc) & "").ClearContents Else ' Condition is met Let arrS3(cnt)(1, UBound(arrS3(cnt), 2)) = UBound(arrS3(cnt), 2) - 1 ' Put in a value in last array "column" End If End Select ' Edit: see corrrection post #16 below : http://www.excelfox.com/forum/showth...ll=1#post12858
The biggest problem remains that you cannot explain anything correctly in English. The biggest problem is not Excel or Excel VBA. The biggest problem is the communication difficulty between us
Have you tried this ?
https://translate.google.de/?hl=de#v...te&sl=mr&tl=en
https://translate.google.de/?hl=de#v...%20language%3F
Alan




Reply With Quote

Bookmarks