Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching unknown number of cells for a value
I'm working to improve our departments accuracy when taking customer
orders. The company I work for is rather new and so I'm armed only with excel to solve many of the problems we experience. I've found macros to be extremely useful, and I know just enough VBA to edit the macros so they function exactly how I want them to. My current problem is this, we have outstanding issues with some customers that need to be resloved, and the best time to take care of these issues is to speak with them when they call in to order. Right now, we have a list of customer names that our phone operators look through. The list is growing and they aren't being as diligent about checking the list. What I would like to do is put customer numbers and names in an excel sheet along with the order form, and when the operator processes the order, and puts in the customer information, they can use a command button which will run down the list and check to see if the customer is on it, and respond with message box. I know how to get the command button to work and also the message box. What I really need to know is what is the most efficient way to take a value, say the customer number, and search through another sheet in the same workbook to see if they are on the list. Any help or code snipits that anyone can provide will be greatly appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching unknown number of cells for a value
Dim rng as Range
Dim sTarget as String sTarget = "CustomerID" set rng = worksheets("sheet2").Cells.Find(what:=sTarget) if not rng is nothing then msgbox sTarget & " was found" Application.Goto Reference:=rng, scroll:=True Else Msgbox sTarget " was not found" End If -- Regards, Tom Ogilvy "Andrea" wrote in message om... I'm working to improve our departments accuracy when taking customer orders. The company I work for is rather new and so I'm armed only with excel to solve many of the problems we experience. I've found macros to be extremely useful, and I know just enough VBA to edit the macros so they function exactly how I want them to. My current problem is this, we have outstanding issues with some customers that need to be resloved, and the best time to take care of these issues is to speak with them when they call in to order. Right now, we have a list of customer names that our phone operators look through. The list is growing and they aren't being as diligent about checking the list. What I would like to do is put customer numbers and names in an excel sheet along with the order form, and when the operator processes the order, and puts in the customer information, they can use a command button which will run down the list and check to see if the customer is on it, and respond with message box. I know how to get the command button to work and also the message box. What I really need to know is what is the most efficient way to take a value, say the customer number, and search through another sheet in the same workbook to see if they are on the list. Any help or code snipits that anyone can provide will be greatly appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching unknown number of cells for a value
That worked like an absolute charm. Thank you so very much!!!
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding the unknown number | Excel Worksheet Functions | |||
Finding Unknown number | Excel Worksheet Functions | |||
FINDING THE UNKNOWN NUMBER | Excel Worksheet Functions | |||
Unknown number format | Excel Worksheet Functions | |||
Dividing by unknown to get a number | Excel Worksheet Functions |