+ Reply to Thread
Results 1 to 8 of 8

Add names to blocks

  1. #1
    Registered User
    Join Date
    03-22-2006
    Posts
    25

    Add names to blocks

    Hi, can anyone help me with the following:

    In a worksheet I have (not equal) blocks of data. In column A there is the projectnumber, in columns B-K there are data. Projects are devided by an empty row. All rows in some block have in column A the same value (projectnumber).
    What I need is the following: I would like to add names to that blocks. The name must be equal to the projectnumber.
    Thanks for helping!
    Last edited by jgmiddel; 10-09-2008 at 04:32 PM.

  2. #2
    Registered User
    Join Date
    05-17-2008
    Posts
    51

    Smile Hi

    Place the Cursor in the block and use Ctrl+A to select the entire block (single Block) and again press Ctrl+F3 to define the names.

    Go To next block and do the same....

    Hope it solves your problem....

    Regards,
    guru

  3. #3
    Registered User
    Join Date
    03-22-2006
    Posts
    25
    Funny, guru... . I need a macro for it. Otherwise I wouldn't have had post it in 'programming'.

  4. #4
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Add names to blocks

    Please Login or Register  to view this content.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  5. #5
    Registered User
    Join Date
    03-22-2006
    Posts
    25
    Thanks a lot, but it doesn't seem to work. No names are added to my worksheet.

  6. #6
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Add names to blocks

    Should have added my worksheet. Sorry for that. Note that it is a quick and dirty method, adjust it so you'll like it. As you did not add a worksheet you need to customize it anyhow.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-22-2006
    Posts
    25
    Ah, I see what happened. If the value a cell in column A doesn't start with 'proj' the macro skips the value. Is there a way it will pick all sort of values?

  8. #8
    Registered User
    Join Date
    03-22-2006
    Posts
    25
    OK, I found out what was going wrong. If the projectnumber contains only digits or starts with a letter, it will not work. Problem is solved so far.
    But, I need to add some row wich places "Proj" before all values in column A. Of course, when it's there already, skip it.

+ 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. New to VBA and Excel, need help splitting a name field and dumping extra middle names
    By Jonnymorris in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-05-2008, 08:44 AM
  2. identifying two names abriviated and grouped
    By Don Juan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-14-2008, 06:37 AM
  3. how do I search a word or pdf for a list of names in a CSV file?
    By Martin Crane in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2008, 05:16 PM
  4. Randomly Pair Names in a list
    By Gos-C in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2006, 01:14 PM

Tags for this Thread

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