Hi, hopefully someone can help me!
I was hoping to devise a way to be able to enter a code to display a certain word in a worksheet.
For example.
Entering for example 10 would return blue
Entering for example 11 would return green
Entering for example 15 would also return green
However for statistical purposes it was hoped that I would be able to count the number of times 15 or 11 was entered and not the word green.
I have attempted to find this out through many forums however cannot seem to figure it out. Hopefully someone could lend a hand!
Hello,
set up a table in your workbook that lists the codes and the text side by side in two separate columns
In another area of the spreadsheet, for example in D1 enter the number. In E1 enter this Vlookup formulaA B 10 blue 11 green 15 green
=Vlookup(D1,$A$1:$B$3,2,false)
E1 will now contain the text. Copy E1 down and enter more codes in column D.
You can then perform a count of codes in column D to find out how often each code has been used.
This approach can be refined with error trapping to avoid N/A errors in column E if the cell in column D is empty.
cheers,
Last edited by teylyn; 06-05-2011 at 06:47 AM. Reason: broken 'e' key.
You could use the CHOOSE FUNCTION if your numbers are 1 to 29
Last edited by royUK; 06-05-2011 at 01:17 PM.
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks