PDA

View Full Version : Copy row from one workbook to another workbook based on conditions in two other workbooks



fixer
07-06-2020, 12:38 AM
Hi,
I am looking for a macro that will do the things mentioned below

If coloumn I of 1.xls matches with column Z of ap.xls & column K of ap.xls is equals to column L of ap.xls Then
Look column H of 1.xls & if column H of 1.xls is greater than column D of 1.xls then it has to copy the first row of OrderFormat.xlsx & pate it to BasketOrder.xlsx (in sheet1 & sheet1 name can be anything)

Or

If coloumn I of 1.xls matches with column Z of ap.xls & column K of ap.xls is equals to column L of ap.xls Then
Look column H of 1.xls & if column H of 1.xls is lower than column D of 1.xls then it has to copy the third row of OrderFormat.xlsx & pate it to BasketOrder.xlsx (in sheet1 & sheet1 name can be anything)

The output of the macro will be in BasketOrder.xlsx (I have mentioned the result plz see)

Thnx For the Help

DocAElstein
07-07-2020, 12:45 PM
Hi

.... (I have mentioned the result plz see)
It is not very clear what you mean.
it is better if you always show a Before,
and an
After

I will assume that your supplied , BasketOrder..xlsx is for After : See here
https://excelfox.com/forum/showthread.php/2345-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=14183&viewfull=1#post14183

So

Before
_____ Workbook: BasketOrder.xlsx ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V

1


2
Worksheet: Sheet1 6July


After running macro ( https://excelfox.com/forum/showthread.php/2345-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=14184&viewfull=1#post14184 )

_____ Workbook: BasketOrder.xlsx ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V

1NSEEQNANANA
0
0BUYMARKETNACLIMISDAYWC5758NA
3NA


2
Worksheet: Sheet1 6July

Macro here: https://excelfox.com/forum/showthread.php/2345-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=14184&viewfull=1#post14184


Alan



OrderFormat.xlsx : https://app.box.com/s/kuzt08prbeyql5hpvn7bhd0vbgvbu4mo
BasketOrder.xlsx : https://app.box.com/s/y05b4hglggc4iyodf8qqipbrhsjjpovk
1.xls : https://app.box.com/s/38aoip5xi7018y9syt0xe4g04u95l6xk
ap.xls : https://app.box.com/s/pq6nqkfilk2xs5lf19ozcpx081rp47vs
macro.xlsm : https://app.box.com/s/z358r7tbc9hzthi539dlj49jsf4gyg8p

Note: I use BasketOrder.xlsx
You use BasketOrder..xlsx
It is very stupid and dangerous to use an extra .
But its your choice: You do all stupid things if you want to :)

fixer
07-07-2020, 05:42 PM
Problem Solved
Thnx Alot Doc Sir for helping me in solving this Problem
Have a Great Day


"You use BasketOrder..xlsx"
I have not choosed it
Its the system
whenever i want to download the file everytime it puts this name to the file
So I cant do Anything in that