User Profile

Collapse

Profile Sidebar

Collapse
atr8340
atr8340
Last Activity: Oct 4 '11, 03:53 PM
Joined: Sep 29 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • atr8340
    started a topic Extracting File Name

    Extracting File Name

    I am writing a macro to preform processes on an excel spreadsheet. I'm trying to use the file name string to input into cells. I have tried the following code:

    Code:
    MyName = ThisWorkbook.Name
    The workbook I am working out of is called "2008 02.xlsx", but when I run this code the variable "MyName" returns "PERSONAL.X LS". It my be something about the version of excel I am using (2003 version)....
    See more | Go to post

  • atr8340
    replied to Colon as a Delimiter
    Thank you ADezii. That gave me what I needed to work with. The code I used was this:

    Code:
    'find the last row in the "A" column
    numberofrows = Range("A65536").End(xlUp).Row
    'write a for statement to iterate through every row except for the column header row (A1)
    For h = 2 To numberofrows
    
    'Use my iteration variable "h" to search through the text in each cell
    Cells(h, 1).Select
    ...
    See more | Go to post

    Leave a comment:


  • atr8340
    started a topic Colon as a Delimiter

    Colon as a Delimiter

    I am trying to take a string (specifically one in the format "2008-09-01 00:00") and write an if statement to perform a process if the value to the right of the rightmost colon is anything but "00"

    I have extracted the text from the cell using the code:

    Code:
    For h = 2 To NumberOfRows
      Cells(h, 1).Select
      Dim v As Variant
      Mytext = Cells(h, 1).Text
    "Mytext" displays...
    See more | Go to post
    Last edited by NeoPa; Sep 29 '11, 11:10 PM. Reason: Added mandatory [CODE] tags for you
No activity results to display
Show More
Working...