Results 1 to 4 of 4

Macro To Add New Worksheet

Threaded View

  1. #4
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    I notice a few others have replied since I started looking at this. Anyway....

    I think you are saying that normally A30 contains Totals, but sometimes it is cell A31 or A32 etc. If I can assume that ONE cell in column A at or below A30, then the following code will find the cell for you.


    Range("A29").Select
        Do While Selection.Value <> "Totals"
           Selection.Offset(1, 0).Select
        Loop
        myrow = Selection.Rows
        mycell = "e" & myrow
        Sheets(NoOfSheets + 1).Range("E2").Value = mycell.Value
    Matt
    Last edited by VBA Noob; 11-02-2008 at 04:51 PM.

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