ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do I create a formula (https://www.excelbanter.com/excel-discussion-misc-queries/192074-how-do-i-create-formula.html)

Harold[_2_]

how do I create a formula
 
can anybody help me???

I'm trying to creat a formula In excel for a spread sheet that i'm creating.
ok here we go what I'm trying to do is that if I input the number 1 in a cell
i want the next cell to automatically inputs of what number 1 repersents .
Example In C5 I enter the number 1, in C6 autmaically inputs Tree so the
formual should represents if 1=tree. Thats were im getting stuck I do not
know how to create this formula.

Bob Phillips[_3_]

how do I create a formula
 
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "5:5" '<== change to suit
Dim sh As Worksheet

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target

Select Case .Value

Case 1: .Offset(1, 0).Value = "tree"
Case 2: .Offset(1, 0).Value = "hedge"
'etc
End Select
End With
End If

End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
__________________________________
HTH

Bob

"Harold" <Harold @discussions.microsoft.com wrote in message
...
can anybody help me???

I'm trying to creat a formula In excel for a spread sheet that i'm
creating.
ok here we go what I'm trying to do is that if I input the number 1 in a
cell
i want the next cell to automatically inputs of what number 1 repersents .
Example In C5 I enter the number 1, in C6 autmaically inputs Tree so the
formual should represents if 1=tree. Thats were im getting stuck I do not
know how to create this formula.




MyVeryOwnSelf

how do I create a formula
 
I'm trying to creat a formula In excel for a spread sheet that i'm
creating. ok here we go what I'm trying to do is that if I input the
number 1 in a cell i want the next cell to automatically inputs of
what number 1 repersents . Example In C5 I enter the number 1, in C6
autmaically inputs Tree so the formual should represents if 1=tree.


One way to get started:
=CHOOSE(C5,"tree","rock","paper","scissors")
This assumes that the numbers you mean are 1, 2, 3, etc.


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com