Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting in xcel in 1 cell txt valua based on number in other cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Getting in xcel in 1 cell txt valua based on number in other cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Getting in xcel in 1 cell txt valua based on number in other cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Getting in xcel in 1 cell txt valua based on number in other cell

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
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
Changing cell text color based on cell number W. Wheeler Excel Programming 1 April 23rd 07 07:24 AM
Changing cell text color based on cell number W. Wheeler Excel Programming 0 April 22nd 07 11:56 PM
Changing cell text color based on cell number scotty Excel Programming 9 April 14th 07 06:34 AM
formatting cell number based on previous cell number Pasquini Excel Discussion (Misc queries) 3 June 20th 06 06:36 AM
returning a text cell based on a number cell Josh7777777 Excel Worksheet Functions 2 November 2nd 04 07:42 PM


All times are GMT +1. The time now is 06:32 PM.

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

About Us

"It's about Microsoft Excel"