Results 1 to 5 of 5

Changing the numbers in cells based on the number inputted

Threaded View

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    Karachi
    MS-Off Ver
    Excel 2010
    Posts
    18

    Changing the numbers in cells based on the number inputted

    Hi,
    *Found a solution, will post asap.

    My scenario is that I will have random numbers in cell B:B, the numbers will be inputted by the user in cell B:B (the numbers may range from 1~9, 1~5, 1~3, any combination). In cell D3 the user will enter the highest range of the numbers (so if B:B contains only numbers between 1~5 the highest range can be 5 or 1, if B:B contains numbers between 1~7 the highest range can be 7 or 1, etc).

    What I need to be able to do is that I want to switch numbers if the value in D3 (highest range) is other than 1, so if the range B:B contains numbers from 1~9 and the value in D3 is 9, this means the numbers have to be resorted (using column D:D). 9 will become 1, 8 will be 2, 7 will be 3, 6 will be 4, 5 will be 5, 4 will be 6, 3 will be 7, 2 will be 8, and 1 will be 9)....

    To be clear (if the range in B:B was from 1~4, and the Value in D3 was 4, this means it will resort B:B in D:D changing numbers from 4 will be 1, 3 will be 2, 2 will be 3, 1 will be 4). I hope this makes sense.

    If the value put in D3 is 1 the exact B:B will be copied to D:D

    Any help on this will be much appreciated, my head is spinning right now trying to think how to do this... the excel file is attached here.

    Example,
    Column B:B
    5
    5
    3
    7
    8
    4
    2
    3
    5
    5
    5
    6
    4
    4
    8
    8
    6
    2
    2
    1
    1
    3
    3
    5
    5
    4
    4
    6
    8
    7
    9
    5
    5
    Column D3 = 9
    Column D:D will become
    5
    5
    7
    3
    2
    6
    8
    7
    5
    5
    5
    4
    6
    6
    2
    2
    4
    8
    8
    9
    9
    7
    7
    5
    5
    6
    6
    4
    2
    3
    1
    5
    5
    Attached Files Attached Files
    Last edited by WaqasTariq; 09-20-2012 at 04:23 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1