Macros

M

Mully

I HAVE A LIST OF NAMES AND FIGURES IN A MACRO AS SHOWN
BELOW. HOWEVER IN SAY CELL A25 I MAY HAVE TO ENTER THE
NAME A. OLLERENSHAW NO PROBLEM ON ENTERING A.O THE FULL
NAME ENTERS CELL A25 - BUT HOW DO I GET THE FIGURES AT B2
& C2 TO ENTER B25 & C25 ON JUST ENTERING THE NAME A.
OLLERSHAW.


[a2] = "A.OLLERENSHAW"
[b2] = "105"
[c2] = "1000"
[a3] = "A. PARTRIDGE"
[b3] = "106"
[c3] = "1160"
[a4] = "A. SHAW"
[b4] = "103"
[c4] = "457"
[a5] = "B. KENNARD"
[b5] = "104"
[c5] = "813"
Range("A25:A40") = ""


LIST OF NAMES AND FIGURES CONTINUE UPTO CELL A24 - B24 -
C24
Range("A25:A40") = ""
 
D

Debra Dalgleish

You could create a lookup table, that contains the list of names and
matching numbers. Then, in the data entry table, use the VLookup
function to return the numbers for the name that you've entered.

There's information on VLookup in Excel's help, and here:

http://www.contextures.com/xlFunctions02.html
I HAVE A LIST OF NAMES AND FIGURES IN A MACRO AS SHOWN
BELOW. HOWEVER IN SAY CELL A25 I MAY HAVE TO ENTER THE
NAME A. OLLERENSHAW NO PROBLEM ON ENTERING A.O THE FULL
NAME ENTERS CELL A25 - BUT HOW DO I GET THE FIGURES AT B2
& C2 TO ENTER B25 & C25 ON JUST ENTERING THE NAME A.
OLLERSHAW.


[a2] = "A.OLLERENSHAW"
[b2] = "105"
[c2] = "1000"
[a3] = "A. PARTRIDGE"
[b3] = "106"
[c3] = "1160"
[a4] = "A. SHAW"
[b4] = "103"
[c4] = "457"
[a5] = "B. KENNARD"
[b5] = "104"
[c5] = "813"
Range("A25:A40") = ""


LIST OF NAMES AND FIGURES CONTINUE UPTO CELL A24 - B24 -
C24
Range("A25:A40") = ""
 
M

Mully

Thanks for the info - would it be possible for the lookup
to be included within the macro. Also i have a problem
that when someone on the list is on holiday and do not
meet any targets for the week - could I enter 0 in say
column D and then they would be excluded from the list-
see below for example. It follows that A.SHAW with a zero
in column D is on holday and is not to be included in the
weeks totals.

Many thanks for your time & efforts

Regards
Mully

[a2] = "A.OLLERENSHAW"
[b2] = "105"
[c2] = "1000" d2 130
[a3] = "A. PARTRIDGE"
[b3] = "106"
[c3] = "1160" d3 165
[a4] = "A. SHAW"
[b4] = "103"
[c4] = "457" d4 0
[a5] = "B. KENNARD"
[b5] = "104"
[c5] = "813" d5 99
Range("A25:A40") = ""


LIST OF NAMES AND FIGURES CONTINUE UPTO CELL A24 - B24 -

-----Original Message-----
You could create a lookup table, that contains the list of names and
matching numbers. Then, in the data entry table, use the VLookup
function to return the numbers for the name that you've entered.

There's information on VLookup in Excel's help, and here:

http://www.contextures.com/xlFunctions02.html
I HAVE A LIST OF NAMES AND FIGURES IN A MACRO AS SHOWN
BELOW. HOWEVER IN SAY CELL A25 I MAY HAVE TO ENTER THE
NAME A. OLLERENSHAW NO PROBLEM ON ENTERING A.O THE FULL
NAME ENTERS CELL A25 - BUT HOW DO I GET THE FIGURES AT B2
& C2 TO ENTER B25 & C25 ON JUST ENTERING THE NAME A.
OLLERSHAW.


[a2] = "A.OLLERENSHAW"
[b2] = "105"
[c2] = "1000"
[a3] = "A. PARTRIDGE"
[b3] = "106"
[c3] = "1160"
[a4] = "A. SHAW"
[b4] = "103"
[c4] = "457"
[a5] = "B. KENNARD"
[b5] = "104"
[c5] = "813"
Range("A25:A40") = ""


LIST OF NAMES AND FIGURES CONTINUE UPTO CELL A24 - B24 -
C24
Range("A25:A40") = ""


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top