+ Reply to Thread
Results 1 to 11 of 11

selected item from column to line

  1. #1
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Toulouse
    MS-Off Ver
    Excel 2010
    Posts
    141

    selected item from column to line

    I have a list of 20 cities in K1:20 and they can be selected from a drop down menu in column A2:A22. I want then to randomly pick 6 out of 20 and these 6 cities must to appear in a line A1, B1, C1, D1, F1, and G1
    On cell A1 I have used the
    IF ( A2=K1,K1, IF(A3=K1,K1……………………….A22=K1,K1,IF(A2=K2,K2………A22=K3,K3)


    it seem to be an endless formula is there another way to make it easy ???


    Thanks

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: selected item from column to line

    LINE.xlsx
    Please see attached
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Toulouse
    MS-Off Ver
    Excel 2010
    Posts
    141

    Re: selected item from column to line

    Quote Originally Posted by RobertMika View Post
    Attachment 287712
    Please see attached
    Thank you for the information , but still just one little think I have applied it to a fleet of airplanes and for each selected plane there are men power assigned to it
    therefore when I select the OK box I want the cell to be empty and the other cell should not shift to another one so that I can have a control of the men power
    please I.e If I check to ok Box on D2-EVW , then the D2-FFJ should not move to the cell where D2-EVW . is there away to do so
    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: selected item from column to line

    If you click box on D2-EVW it will show this entry in column AA.
    So it will pop into row AC( cell AC8).
    What's your desired outcome?

  5. #5
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Toulouse
    MS-Off Ver
    Excel 2010
    Posts
    141

    Re: selected item from column to line

    Quote Originally Posted by kuzna26 View Post
    Thank you for the information , but still just one little think I have applied it to a fleet of airplanes and for each selected plane there are men power assigned to it
    therefore when I select the OK box I want the cell to be empty and the other cell should not shift to another one so that I can have a control of the men power
    please I.e If I check to ok Box on D2-EVW , then the D2-FFJ should not move to the cell where D2-EVW . is there away to do so
    Thanks
    Hello
    My desired outcome is when for example you uncheck the box for 6 airplanes
    they will appear in these lines according to the selection
    AC8 = D2-EVW, AD8 =D2-EVL , AE8= D2-EVY , AF8= ERQ , AG8=EVB , AH8=FVO:
    if you check the first airplane entered in AC8 which IS D2-EVW this cell must be empty and the
    others cells should not move to AC8 . Unfortunately the way it is now if I check the first entered plane the rest of cells will shift to the left
    I don't want the cell to shift.

    thank you .

  6. #6
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: selected item from column to line

    So where D2-EVW should be placed when you untickted the box?
    What if 7 plains will be unticked?

  7. #7
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Toulouse
    MS-Off Ver
    Excel 2010
    Posts
    141

    Re: selected item from column to line

    Quote Originally Posted by RobertMika View Post
    So where D2-EVW should be placed when you untickted the box?
    What if 7 plains will be unticked?


    The desired outcome here is to prevent the cells to shift /move when one box is checked: Check the Box of D2-EVW and It shall look like this example

    AC8 = Empty, AD8 =D2-EVL, AE8= D2-EVY, AF8= ERQ, AG8=EVB, AH8=FVO

    You can only check 6 planes at the time, therefore if you select another airplane it must placed in the place where D2-EVW was.

    But from the attached sheet ,please just try to check the Box of D2-EVW you will see that the cell shift and it will look like this

    AC8 =D2-EVL, AD8 =D2-EVY, AE8= ERQ, AF8=EVB, AG8= FVO, AH8= Empty

    I hope you notice the difference


    thank you,
    Attached Files Attached Files

  8. #8
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: selected item from column to line

    What's prevents to choose more that 6 plains?
    I have ticked aroudn 12 boxes and all entries are in column AB.

  9. #9
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Toulouse
    MS-Off Ver
    Excel 2010
    Posts
    141

    Re: selected item from column to line

    Quote Originally Posted by RobertMika View Post
    What's prevents to choose more that 6 plains?
    I have ticked aroudn 12 boxes and all entries are in column AB.

    no matter how many you ticked , there will be only 6 cells visible therefore the first 6 picked get placed in those visible cells , and the 7th ticked will placed provided that I select one of the of those 6 and so one : But the main ideal here is to keep the cell not to shift
    I hope you understand my final outcome

  10. #10
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: selected item from column to line

    Quote Originally Posted by kuzna26 View Post
    no matter how many you ticked , there will be only 6 cells visible therefore the first 6 picked get placed in those visible cells ,
    Quote Originally Posted by kuzna26 View Post
    and the 7th ticked will placed provided that I select one of the of those 6 and so one
    Which of the are visible?
    How can you pick up 7th from 6?

  11. #11
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Toulouse
    MS-Off Ver
    Excel 2010
    Posts
    141

    Re: selected item from column to line

    Quote Originally Posted by RobertMika View Post
    Which of the are visible?
    How can you pick up 7th from 6?

    actually u can only pick six :

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Making The Last Combo Box Item Always The Selected Item
    By abduljaleel.mca in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2013, 10:31 AM
  2. Replies: 2
    Last Post: 01-30-2013, 03:16 AM
  3. VBA Extract unique values depending on selected item in another column
    By DavidBW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2013, 05:30 AM
  4. Combining multiple line items into one line item based on column.
    By mguz018 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2012, 07:22 PM
  5. If column A is a June date, return the dollar value for that line item.
    By dearickmilton in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-09-2009, 08:39 AM

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