Link to home
Start Free TrialLog in
Avatar of Sachin Singh
Sachin Singh

asked on

Conditionally copy and paste the data By adding/subtracting by percentage

If column B of sheet1  and column C of sheet3 is same
and
If column J of sheet3 is BUY then  add 0.01% of column D of sheet1  with itself and paste the data to column L of sheet3 and add 0.1% of column D of sheet1 with itself and paste the data to sheet3 column G
If column J of sheet3 is SELL then  subtract  0.01% of column D of sheet1  with itself and paste the data to column L of sheet3 and subtract 0.1% of column D of sheet1 with itself and paste the data to sheet3 column G
OneClick.xlsb
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sachin Singh
Sachin Singh

ASKER

Thnx alot Neeraj Sir for ur great support
but in the result i am getting after decimal 3 to 4 numbers  after can it be after decimal only two numbers
I will find the solution  for this,  this problem is not related to this , the code is Perfect
Have a Great Day Sir
That's not a big deal.
Change lines#13 and 14 to this...
Buy.Item(x(i, 2)) = Round(x(i, 4) * 1.0001, 2) & "_" & Round(x(i, 4) * 1.001, 2)
Sell.Item(x(i, 2)) = Round(x(i, 4) * (1 - 0.0001), 2) & "_" & Round(x(i, 4) * (1 - 0.001), 2)

Open in new window

Thnx Neeraj Sir for ur Support
I will open a new post Neeraj Sir Bcoz it is conditional  we have to play with  the decimal bcoz system support second value after decimal in 0.05 or 0.10
this is  something different i dont want to mix this post with another problem
Neeraj Sir i have modified the file plz look into it and do needful
I have modified the file Sorry Sir but that decimal was creating an issue that y i have modified the file
OneClick.xlsb
Leave this question Neeraj Sir