Results 1 to 4 of 4

filling a table based on header row name

Threaded View

  1. #1
    Registered User
    Join Date
    10-04-2008
    Location
    Bristol, UK
    Posts
    2

    filling a table based on header row name

    Hi,

    Can you help me with the code below?
    I'm trying to fill a status taken from column b and put it in a table
    in between two time values. the first time value is
    c.offset(0,1)
    and
    the second is
    c.offset(0,2)
    . In the table the times are held in row
    1. The status will be sick or holiday etc, if the person is at work
    they have a numeric duty code hence the isnumeric check. Once the
    status has been filled to the time window, the next "c" in the range
    is checked.

    For Each c In Sheets("Staff Monday").Range("B2:B100")
      isDuty = IsNumeric(c.Value)
      If isDuty = False Then
          Status = c.Value
          For Each r In Range(c.Offset(0, 5), c.Offset(0, 148))
              If Cells(1, r.Column).Value = c.Offset(0, 1) Then
              r.Value = Status
    
              Do Until Cells(1, r.Column).Value = c.Offset(0, 2).Value
              r.Offset(0, MyOffset).Value = Status
              MyOffset = MyOffset + 1
              Loop
              End If
    
    
          Next r
      End If
    Next c
    regards,
    Matt
    Last edited by VBA Noob; 10-04-2008 at 02:17 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 08-07-2008, 12:23 AM
  2. Excel 2003: VBA to control Header title based on date in cell B3.
    By jplink49 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-06-2008, 04:05 PM
  3. To formulate a table based off a single row of Pivot data
    By money n da sank in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-31-2008, 11:28 AM
  4. Copying photos based on a lookup table?
    By MrSandman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2008, 01:56 AM
  5. Populate Table 1 based on values in Table 2
    By Alan1981 in forum Excel General
    Replies: 5
    Last Post: 10-22-2007, 04:34 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