A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Setting up and Configuration
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Circular formulas



 
 
Thread Tools Display Modes
  #1  
Old April 18th, 2008, 04:56 PM posted to microsoft.public.excel.setup
sueb
external usenet poster
 
Posts: 17
Default Circular formulas

If I create a formula for a cell, in that cell, I can't add any data to make
the formula work as it erases the formula.

Example - I want "1" to change to "Male" and "2" to change to "Female".
I've created the formula no problem but I need the data to be reflected in
the cell in which I have created the formula. Is that even possible?
  #2  
Old April 19th, 2008, 02:50 PM posted to microsoft.public.excel.setup
Marcelo
external usenet poster
 
Posts: 981
Default Circular formulas

http://www.cpearson.com/newsletter/c...2007_07_23.htm

Hello,

Try to look the Chip Pearson's newsletter on this address.

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"SueB" escreveu:

If I create a formula for a cell, in that cell, I can't add any data to make
the formula work as it erases the formula.

Example - I want "1" to change to "Male" and "2" to change to "Female".
I've created the formula no problem but I need the data to be reflected in
the cell in which I have created the formula. Is that even possible?

  #3  
Old April 19th, 2008, 06:14 PM posted to microsoft.public.excel.setup
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Circular formulas

You cannot manually enter data in a cell that contains a formula so forget that
step.

You can use a helper cell to enter the 1 or 2 or event code with no formula.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
Select Case Target.Value
Case "1"
Target.Value = "Male"
Case "2"
Target.Value = "Female"
'add more cases if needed
End Select
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module. Edit "A1" to your cell address.

Alt + q to return to the Excel window.

Enter 1 or 2 in A1.......or your edited cell.


Gord Dibben MS Excel MVP

On Fri, 18 Apr 2008 08:56:01 -0700, SueB wrote:

If I create a formula for a cell, in that cell, I can't add any data to make
the formula work as it erases the formula.

Example - I want "1" to change to "Male" and "2" to change to "Female".
I've created the formula no problem but I need the data to be reflected in
the cell in which I have created the formula. Is that even possible?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.