ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Comparing & Retrieving Data From other worksheet (https://www.excelbanter.com/excel-programming/315753-comparing-retrieving-data-other-worksheet.html)

cba321

Comparing & Retrieving Data From other worksheet
 

Hi,

I need help on how to write a vba code for this problem.
I have Sheet1 with 3 columns; Item_Number,Qty_Left,Action_Required an
Sheet2 with Part_Number,Company,On_Hand. Under Company ha
CompanyA,CompanyB,CompanyC. The result is returned unde
Action_Required in Sheet1

My question is:-

IF Qty_Left.Sheet1 < 0 THEN
MATCH (Item_Number.Sheet1) WITH (Part_Number.Sheet2) WHER
(Company.Sheet2) < CompanyA
IF (On_Hand.Sheet2) = 0 THEN
Display Message
"Order"
ELSE
Display Message = "Order from" + Company.Sheet
(depends on which company has more On_Hand; either CompanyB o
CompanyC)
END IF
ELSE
Display Message = "OK"
END IF

So, my problem is I don't know how to write vba code to solve thi
problem. Can somebody help me...?? 10

--
cba32
-----------------------------------------------------------------------
cba321's Profile: http://www.excelforum.com/member.php...fo&userid=1606
View this thread: http://www.excelforum.com/showthread.php?threadid=27519



All times are GMT +1. The time now is 04:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com