Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default excel formula

Hi, Is it possible to have a formula in a cell to do the following:
Range("a1") can equal 1 to 5.
Range("b2") can equal either 'Playing', 'Winner' or 'Loser'

If A1 = 1 THEN B1 = " "
If A1 = 2 THEN B1 = "Playing "
If A1 = 3 THEN B1 = "Playing or Winner or Loser"
If A1 = 4 THEN B1 = "Playing or Winner or Loser"
If A1 = 5 THEN B1 = "Winner or Loser".
These values update automatically, I have no control over what the
values will be, but these are the only possible outcomes. What Id like
to do in 'C1' is:

If a1 greater than 1 then c1 = b1. I can do that. But if c1 = either
Winner or Loser, and the value in a1 = 1 I dont want c1 to update until
a1 = 1. Does that make sense.
eg; a1 = 1, b1 = playing, c1 = "" (Im assuming Ive just started
updating data)
a1 = 2, b1 = Playing, c1 = Playing
a1 = 3, b1 = Winner or Loser, c1 = Winner or Loser (Once
winner/Loser entered, cycle starts again.)
a1 = 1, b1 = Winner or Loser (because of prev result.)
a1 = 2, b1 = Playing, all starts again etc.

Ive tried nesting If's but cant seem to crack it. Im thinking I may
have to write a function.

Regards Robert

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default excel formula

Type this into c1. I think this will do what you want. Your explanation
is a bit cryptic.



=if(and(a1=1,or(b1="WINNER","LOSER")),"",b1)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default excel formula


Thankyou for your reply. I tried the formula but it would not return a
value. After re reading my post, your right it is a bit criptic. If I
have =b1 in c1. Then if the result in c1 = Winner or loser, I dont want
this value to change when a1 = 1. Its to do with a program that feed
info into excel, what tends to happen is a1 will = 1 b1 = playing, and
these values dont change for about 20 seconds. But if the value in b1 =
winning or losing the values change in about 2 seconds. I need to hold
this value long anough for me to run a macro to do things with the
data. Whence I thought if I could shove the results some were else. At
the moment though the values are changing at the same time. When a1 =
1, the game isnt in play whence the reason for wanting to skip 1.
Regards Robert

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default excel formula


RobcPettit wrote:
I think you were right in thinking that you might have to make a custom
function. You might try posting in the excel worksheet functions group.
The folks in there are quite clever and might be able to solve your
problem without having to code it.

HTH

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
When I enter a formula, Excel shows the formula not the results Pat Adams Excel Worksheet Functions 5 April 4th 23 11:18 AM
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


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

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

About Us

"It's about Microsoft Excel"