greatnewtaste
New Member
- Joined
- Mar 22, 2011
- Messages
- 7
Hi all,
macro newbie here, any help is greatly appreciated
i will try to be as detailed as possible
i have two worksheets
worksheet1 columns
code, side, quantity
worksheet2 columns
code, side, quantity
*yes, both have same columns
the side column can have only three values: 1,2, or 5 (buy, sell, shortsell for those that are curious)
what i need:
for every code and side in ws1 find the corresponding code and side in ws2
compare the quantities in both rows
if the quantity in ws2 >= quantity in ws1 ...display ok in the cell next to the row in ws1
if the quantity in ws2 < quantity in ws1...display the difference in the quantities
the code can appear multiple times in ws2
example:
ws1:
3035 5 49,000
2606 2 2,000
2498 2 1,000
2912 2 3,000
2887 2 17,000
5522 2 22,000
ws2:
2887 2 34000
2324 2 68000
9933 2 258000
2204 2 14000
2204 5 14000
been trying to find a solution for ages now, need help <!-- / message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_sig --><!-- END TEMPLATE: ad_showthread_firstpost_sig -->
macro newbie here, any help is greatly appreciated
i will try to be as detailed as possible
i have two worksheets
worksheet1 columns
code, side, quantity
worksheet2 columns
code, side, quantity
*yes, both have same columns
the side column can have only three values: 1,2, or 5 (buy, sell, shortsell for those that are curious)
what i need:
for every code and side in ws1 find the corresponding code and side in ws2
compare the quantities in both rows
if the quantity in ws2 >= quantity in ws1 ...display ok in the cell next to the row in ws1
if the quantity in ws2 < quantity in ws1...display the difference in the quantities
the code can appear multiple times in ws2
example:
ws1:
3035 5 49,000
2606 2 2,000
2498 2 1,000
2912 2 3,000
2887 2 17,000
5522 2 22,000
ws2:
2887 2 34000
2324 2 68000
9933 2 258000
2204 2 14000
2204 5 14000
been trying to find a solution for ages now, need help <!-- / message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_sig --><!-- END TEMPLATE: ad_showthread_firstpost_sig -->
<!-- controls -->