+ Reply to Thread
Results 1 to 12 of 12

Pick out cells in column

  1. #1
    Registered User
    Join Date
    09-20-2011
    Location
    N.Wales
    MS-Off Ver
    Excel 2010
    Posts
    63

    Pick out cells in column

    Hi,

    I would like to pick out all cells in column A that has a number in it, then show all the numbers in cell C6 as 18,3,2,1

    A B C
    1 18
    2
    3 3
    4
    5 2
    6 1 18,3,2,1

    Cheers

    Colin

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Pick out cells in column

    as a VBA function:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-20-2011
    Location
    N.Wales
    MS-Off Ver
    Excel 2010
    Posts
    63

    Re: Pick out cells in column

    Hi Kyle 123,

    This will be be my first attempt at VBA function any tips !!!!

    Cheers

    Colin

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Pick out cells in column

    Copy the Kyle's code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    In any cell type

    =JoinNumbers(A1:A5)

    This will check A1 to A5
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Pick out cells in column

    Thanks Roy

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Pick out cells in column

    You provided the code.

    Do you have long legs or commute between Sheffield & Leeds?

  7. #7
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Pick out cells in column

    haha I'd need pretty long legs! I commute to Sheffield everyday - only takes about 30mins though

    This is a bit more resilient as it allows for doing the same thing along a row:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Pick out cells in column

    I worked in Sheffield until earlier this year, it could take longer than 30 minutes to escape some days

  9. #9
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Pick out cells in column

    I work behind don valley stadium so it's not too bad, straight on the M1

  10. #10
    Registered User
    Join Date
    09-20-2011
    Location
    N.Wales
    MS-Off Ver
    Excel 2010
    Posts
    63

    Re: Pick out cells in column

    Hi,

    Both work well, but I am getting 59,,,65,,,,73,,,79,,,,,,,
    aditional comma's where the cell is blank is it possible to get rid of these ?

    Cheers

    Colin

  11. #11
    Registered User
    Join Date
    09-20-2011
    Location
    N.Wales
    MS-Off Ver
    Excel 2010
    Posts
    63

    Re: Pick out cells in column

    Hi - Do you think it's possible to get rid of additional commas ?

  12. #12
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Pick out cells in column

    Give this a whirl:

    Please Login or Register  to view this content.

+ Reply to Thread

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