Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the unknown number sierra spiegel Excel Worksheet Functions 6 November 15th 09 05:40 AM
Finding Unknown number sierra spiegel Excel Worksheet Functions 1 November 14th 09 01:11 AM
FINDING THE UNKNOWN NUMBER sierra spiegel Excel Worksheet Functions 3 November 13th 09 11:33 PM
Unknown number format Don Excel Worksheet Functions 1 September 20th 06 06:17 PM
Dividing by unknown to get a number bundyloco Excel Worksheet Functions 5 August 14th 05 03:44 PM


All times are GMT +1. The time now is 03:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"