Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
VB code help
Hi, I need help writing a simple code that will take a number between 1-4,
out of a single colum in a specific worksheet and identify it with a word. ie. 1=Breakfast, 2=Lunch, 3=Supper and 4=Night. Here is a little back ground, I wrote a program in my TI calc that stores 1-4 to represent the meal time. I now have taken that Matrix from my calc and opened it as a worksheet to make a graph out of it. on my graph I want the words "Breakfast", "Lunch", ect. spelled out at the corresponding spot. Ive done VB code before but I have kind of forgotten most of it :( Thanks for any help. I have cross referenced this in both programing, and misc excel groups. Gordy |
#2
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
VB code help
you need not use vba .you can use spreadsheet formula
your data is from A1 down try this formula in cell in B1 =IF(A1=1,"breakfast",IF(A1=2,"lunch",IF(A1=3,"supp er",IF(A1=4,"night")))) now copy this formula B1 down. chang according to your database if you can use vba use "select" Gordon Byrne wrote in message m... Hi, I need help writing a simple code that will take a number between 1-4, out of a single colum in a specific worksheet and identify it with a word. ie. 1=Breakfast, 2=Lunch, 3=Supper and 4=Night. Here is a little back ground, I wrote a program in my TI calc that stores 1-4 to represent the meal time. I now have taken that Matrix from my calc and opened it as a worksheet to make a graph out of it. on my graph I want the words "Breakfast", "Lunch", ect. spelled out at the corresponding spot. Ive done VB code before but I have kind of forgotten most of it :( Thanks for any help. I have cross referenced this in both programing, and misc excel groups. Gordy |
#3
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
VB code help
=CHOOSE(A1,"breakfast","lunch","supper","night")
-- Andy Wiggins FCCA www.BygSoftware.com Excel, Access and VBA Consultancy - "Gordon Byrne" wrote in message m... Hi, I need help writing a simple code that will take a number between 1-4, out of a single colum in a specific worksheet and identify it with a word. ie. 1=Breakfast, 2=Lunch, 3=Supper and 4=Night. Here is a little back ground, I wrote a program in my TI calc that stores 1-4 to represent the meal time. I now have taken that Matrix from my calc and opened it as a worksheet to make a graph out of it. on my graph I want the words "Breakfast", "Lunch", ect. spelled out at the corresponding spot. Ive done VB code before but I have kind of forgotten most of it :( Thanks for any help. I have cross referenced this in both programing, and misc excel groups. Gordy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming | |||
option buttons run Click code when value is changed via VBA code | Excel Programming | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |