Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
newby in xcel. I am working on a userform. in cell a1 you would select from list 1-25 a valua, this is put in cell a1. Based on valua of a1 in a 2 would be a txt message. example a1 a2 1 text 1 2 text 2 3 text 3 etc 25 text 25 valua a1 is coming from selection list 1-25 what would be the eassiest way to set this up. many thanks in advance jack Submitted via EggHeadCafe ASP.NET Generic Cookie Utility Class http://www.eggheadcafe.com/tutorials...ity-class.aspx |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
jack van oorsouw pretended :
Hello, newby in xcel. I am working on a userform. in cell a1 you would select from list 1-25 a valua, this is put in cell a1. Based on valua of a1 in a 2 would be a txt message. example a1 a2 1 text 1 2 text 2 3 text 3 etc 25 text 25 valua a1 is coming from selection list 1-25 what would be the eassiest way to set this up. many thanks in advance jack Submitted via EggHeadCafe ASP.NET Generic Cookie Utility Class http://www.eggheadcafe.com/tutorials...ity-class.aspx Well.., your use of the term 'easiest way to set this up' is a bit ominous. You might be better off using a dropdown in the ColumnA and a formula using the HLookup function in ColumnB (or wherever), where your 25 text values are stored in row2 of (hidden) rows(1:2) and your 1-25 value choices are stored in row1. Give Range("A1:Y2") a locally defined name something like "TextChoices". Enter this formula in whatever column to the right of Column("A") you want the result put into. =HLOOKUP($A3,TextChoices,2,False) Optionally, you could store the lookup range on a hidden sheet, vertical or horizontal, and use VLOOKUP or HLOOKUP. Give the sheet a name something like "TextValues" and edit the above formula as follows. =HLOOKUP($A3,'TextValues'!TextChoices,2,False) OR =VLOOKUP($A3,'TextValues'!TextChoices,2,False) -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jan 14, 1:09*am, jack van oorsouw wrote:
Hello, newby in xcel. I am working on a userform. in cell a1 you would select from list 1-25 a valua, this is put in cell a1. Based on valua of a1 in a 2 would be a txt message. example a1 * a2 1 * *text 1 2 * *text 2 3 * *text 3 etc 25 * text 25 valua a1 is coming from selection list 1-25 what would be the eassiest way to set this up. many thanks in advance jack Submitted via EggHeadCafe ASP.NET Generic Cookie Utility Classhttp://www.eggheadcafe.com/tutorials/aspnet/e7108c33-1cc6-48ae-9f65-c... Hi Jack, In Excel you can use the inbuilt function ="Your Text " & A1 In VBA you can use the below code execution while value change in A1 Sheets("YourSheetName").Cells(2, 1) = "Your Text " & _ Sheets("YourSheetName").Cells(1, 1) If it is a userform, you can use the same logic, but the number would be the textbox value instead of the cell reference. Ratheesh |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jack
The other option might be to use a Lookup. you could have another sheet "YourOtherSheet" with a list of the numbers and their respective responses. A B 1 Your Message#1 2 Your Message#2 3 Your Message#3 Etc Back to your Main sheet In Cell B1 =Vlookup(A1,YourOtherSheetName!A1:B25,2,False) Not sure if you will need to copy the formula down to other cells below, but if you do, then do as required. HTH Mick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing cell text color based on cell number | Excel Programming | |||
Changing cell text color based on cell number | Excel Programming | |||
Changing cell text color based on cell number | Excel Programming | |||
formatting cell number based on previous cell number | Excel Discussion (Misc queries) | |||
returning a text cell based on a number cell | Excel Worksheet Functions |