Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    May 2007
    Thanked 0 Times in 0 Posts

    Store Results in Specific Cells (Excel 2003)

    Cell H54 (calculation result) must be stored in one of cells H57...H71, depending on the integer value 1...15 entered in cell B3.


    IF B3= 1 THEN cell H57=cell H54
    IF B3= 2 THEN cell H58=cell H54
    IF B3= 3 THEN cell H59=cell H54
    IF B3= 4 THEN cell H60=cell H54
    IF B3= 5 THEN cell H61=cell H54
    IF B3= 6 THEN cell H62=cell H54
    IF B3= 7 THEN cell H63=cell H54
    IF B3= 8 THEN cell H64=cell H54
    IF B3= 9 THEN cell H65=cell H54
    IF B3=10 THEN cell H66=cell H54
    IF B3=11 THEN cell H67=cell H54
    IF B3=12 THEN cell H68=cell H54
    IF B3=13 THEN cell H69=cell H54
    IF B3=14 THEN cell H70=cell H54
    IF B3=15 THEN cell H71=cell H54

    whilst preserving ALL previous results stored in any of these cells (from ALL previous integers entered in B3). H54 will vary with B3.

    Thus, if entering B3 (1,2,3) successively yields corresponding H54 results (5,13,8), then H57=5, H58=13, H59=8 -- all foregoing stored results accumulating progressively (5; 5,13; 5,13,8).

    Likewise, if entering B3 (11,5,8,13,1,2) successively yields H54 results (10,4,15,6,5,13), then H67=10, H61=4, H64=15, H69=6, H57=5, H58=13 -- all foregoing stored results accumulating progressively (10; 10,4; 10,4,15; 10,4,15,6; 10,4,15,6,13; 10,4,15,6,13,3) with each successive integer entered randomly in B3

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 30 Times in 30 Posts

    Re: Store Results in Specific Cells (Excel 2003)

    Welcome to Woody's Lounge!

    I'm not sure I understand your requirements, but see if the attached workbook does what you want. There is a Workbook_Change event procedure in the worksheet module for the single sheet in the workbook. Right-click the sheet tab and select View Code from the popup menu to see the code.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts