+ Reply to Thread
Results 1 to 7 of 7

Selecting part of column

  1. #1
    Forum Contributor
    Join Date
    02-16-2012
    Location
    London, England
    MS-Off Ver
    Excel mac 2011
    Posts
    238

    Selecting part of column

    Hi there,

    I have a macro that a kind gentleman did for me that highlights the weekend in a spreadsheet of a weekly time sheet, I am trying to neaten it up a little. I have this line:
    Please Login or Register  to view this content.
    But what I really want is to select only 20 cells of this column from fourth row down to row 24, what would be a syntax that could replace the line I have there. In the past I have just used Range, but I can't see how to tie it up to the columns that I am selecting.

    Can anyone help me with this please.

    Kind regards
    Rob

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Selecting part of column

    Rob - you could use this, but note you rarely need to Select in VBA, and generally not advisable
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-16-2012
    Location
    London, England
    MS-Off Ver
    Excel mac 2011
    Posts
    238

    Re: Selecting part of column

    Thank you, could you elaborate on the not selecting advice, or point me at a page that explains this, I would rather write code that is robust.

  4. #4
    Forum Contributor
    Join Date
    02-16-2012
    Location
    London, England
    MS-Off Ver
    Excel mac 2011
    Posts
    238

    Re: Selecting part of column

    Hmm, no, I can't get this to work, here is what I am trying to put it into:
    Please Login or Register  to view this content.
    I really don't think this should be that difficult to do, I just want to format the weekends in a different colour for a list of 20 people, but 3 days later and I still can't find a way.

  5. #5
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Selecting part of column

    Not sure you even need VBA, conditional formatting might do the job, but try this:
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-16-2012
    Location
    London, England
    MS-Off Ver
    Excel mac 2011
    Posts
    238

    Re: Selecting part of column

    Conditional formatting was actually what I wanted, but I could not find a way to do it that worked.

    I'm doing something seriously wrong, I can't get either this or my previous macro to run now. For some reason it is skipping over the conditional statement. Basically on row 4, I have dates from now to april next year, then row 5 are the weekdays. The thing is, I don't know what :
    Please Login or Register  to view this content.
    means. How can I find out what value this is referring to? is it a date, or is it the number of the day in this year? or the day in the week?

    I really thought this would be a really simple thing to do.

  7. #7
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Selecting part of column

    I suggest you post a workbook. Btw your code is only run when the sheet is activated. You can consult Help - press F1 - for definitions etc.

+ 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. [SOLVED] Selecting a part of text from 1 column and put this in a new column
    By Armand0 in forum Excel General
    Replies: 2
    Last Post: 10-22-2013, 10:20 AM
  2. [SOLVED] De-Selecting Part of a Selection?
    By mtt23 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-18-2012, 01:35 PM
  3. Selecting part of a series for a chart?
    By Al in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 05-16-2006, 07:50 AM
  4. [SOLVED] Selecting part of a column
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-16-2005, 06:25 PM
  5. Selecting part text in a textbox
    By vqthomf in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-15-2005, 10:05 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