LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Logan
 
Posts: n/a
Default How do I replace data in a cell in Excel?

Ok...Here goes. Finally got this really nice IF statement to work:
=IF(A2(6/7), 1, IF(A2(5/7), 2, IF(A2(4/7), 3, IF(A2(3/7), 4,
IF(A2(2/7), -1, IF(A2(1/7), -2, 0))))))

This is in cell B2

Assigns a value to a random number in A2, and gives seven different outputs
of +1, +2, +3, +4, -1, -2, -ALL

What I want to be able to do is have one cell keep like a running total.
That is, start a cell at zero (we'll say C2), then if the random number is
between 6/7 and 1, add 1 to the C2. Then when i hit F9 again and a new value
comes up, for example, the random number is between 4/7 and 5/7, add 3 to C2
so that now it says 4. Is this possible? I tried:
=IF(A2(6/7), C2=(C2+1), IF(A2(5/7), C2=(C2+2), IF(A2(4/7), C2=(C2+3),
IF(A2(3/7), C2=(C2+4), IF(A2(2/7), C2=(C2-1), IF(A2(1/7), C2=(C2-2),
0))))))

And other variations. Also tried in C2 :
=$C$2+B2 and
=C2+B2
but those just start a circular reference. Thanks for any help.

 
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
How can I replace 2 of 5 characters within an cell in MS Excel? pmhall Excel Worksheet Functions 8 June 8th 05 09:07 PM
How can I copy Word data into a merged cell in Excel? Suzan Wild Excel Discussion (Misc queries) 1 June 1st 05 10:04 PM
Fetching External Data from Excel Sri Excel Discussion (Misc queries) 2 January 3rd 05 11:46 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 06:51 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"