-
Jul 25th, 2020, 10:59 AM
#1
Thread Starter
Junior Member
[RESOLVED] Copy & Paste if condition met with add & subtract
Hi Experts,
I am looking for a macro that will do the things mentioned below
there are 3 files 1.xls & BasketOrder.xlsx & macro.xlsm (macro will be placed in macro.xlsm),both files are loacted in diffrent places so the path will be hardcoded in the macro so that i can change it as per my needs
sheet name can be anything
plz see the sample file
If column C of basketorder.xlsx matches with column B of 1.xls & Column J is BUY then add 0.05 to column D of 1.xls & compare column L of basketorder.xlsx with column D of of 1.xls & if column D of 1.xls is lower then Column L of basketorder.xlsx then replace column L data with column D data OF 1.xls
If column C of basketorder.xlsx matches with column B of 1.xls & Column J is SELL then subtract 0.05 to column D of 1.xls & compare column L of basketorder.xlsx with column D of of 1.xls & if column D of 1.xls is greater then Column L of basketorder.xlsx then replace column L data with column D data OF 1.xls
Thnx for the Help
https://drive.google.com/file/d/1bEO...ew?usp=sharing
https://drive.google.com/file/d/1MlF...ew?usp=sharing
-
Jul 26th, 2020, 05:35 AM
#2
Re: Copy & Paste if condition met with add & subtract
have you tried doing any of this yourself?
in these forums wee try to help people with code they are having problems with, we are not a free code writing service
you have had several examples of code to do similar to what you are asking at least attempt to convert some of it to this task
if you expect other to download your sample workbooks then post them here, zip first
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jul 29th, 2020, 07:17 AM
#3
Thread Starter
Junior Member
Re: [RESOLVED] Copy & Paste if condition met with add & subtract
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|