+ Reply to Thread
Results 1 to 3 of 3

Renaming a worksheet which is obtained everyday and has a dynamic naming convention

  1. #1
    Registered User
    Join Date
    04-27-2012
    Location
    New Delhi
    MS-Off Ver
    Excel 2010
    Posts
    31

    Renaming a worksheet which is obtained everyday and has a dynamic naming convention

    Hi

    I have a worksheet that I get everyday from someone, and it has a name based on the date on which it is received. So if i get that file today the worksheet will be having a name as 27_April_2012_Datasheet, and if i get it tomorrow it would be 28_April_2012_Datasheet and so on and so forth. Can it be copied to a new sheet say sheet1?

    Help would be really appreciated.

    Thanks,
    Abhushan.

  2. #2
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Renaming a worksheet which is obtained everyday and has a dynamic naming convention

    Hi Abhushan,

    Welcome to the forum


    Do you need the data copied from the workbook named 28_April_2012_Datasheet to sheet1 within the same workbook?


    Thanks,

    Bonny Tycoon




    **If I was able to help please click the small star icon at the bottom left of my post **

  3. #3
    Registered User
    Join Date
    04-27-2012
    Location
    New Delhi
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Renaming a worksheet which is obtained everyday and has a dynamic naming convention

    Quote Originally Posted by bonny24tycoon View Post
    Hi Abhushan,

    Welcome to the forum


    Do you need the data copied from the workbook named 28_April_2012_Datasheet to sheet1 within the same workbook?


    Thanks,

    Bonny Tycoon




    **If I was able to help please click the small star icon at the bottom left of my post **
    Yes.

    Another issue is that how could I check for multiple conditions, i.e., i want to check for 3-4 conditions, but its giving me some type mismatch


    The code is mentioned below.

    'checking for a substring inside each cell from column M to O and then deleting that row where it finds one

    Sub substringdelete()
    Dim rcnt As Long, col As Integer, counter As Integer

    rcnt = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
    col = 13
    For i = 2 To rcnt
    While ActiveSheet.Cells(i, col).Value <> ""
    If InStr(1, ActiveSheet.Cells(i, col).Value, "@") > 0 Then
    ActiveSheet.Rows(i & ":" & i).Delete
    counter = counter + 1

    End If
    col = col + 1
    Wend
    col = 13
    Next
    MsgBox ("Number of instances=" & counter)
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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