Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. VegasPat

    VBScript help to convert a column of last names to initials

    After I tried this, the last names did not change. After some testing, I found that cell.Text was returning a null value. I can't figure out why the values for the last names are coming through as just text. When I try to convert the value using CStr, I get a type mismatch error. Since the cell...
  2. VegasPat

    VBScript help to convert a column of last names to initials

    I tried both suggestions and I still get a Type Mismatch error. I feel that the cell.Value is not coming through as a string value for some reason thus the Left command is not working.
  3. VegasPat

    VBScript help to convert a column of last names to initials

    Updated my script and I feel like I'm getting close. After running the script with PHV's snippet, I got a Type Mismatch error on the line: If cell.Value > " " Then My first thought is that I'm comparing text and the > will not work. So I thought to use StrComp instead. The conditional seems to...
  4. VegasPat

    VBScript help to convert a column of last names to initials

    Thanks PVH for pointing me in the right direction. I will work on it today. Skip, that was as far as I got. I didn't know how to code the last part. I was using REPLACE, LEFT & MID on the objRange instead of the cell values. Now I know I need attack the cell values and not just the selected column.
  5. VegasPat

    VBScript help to convert a column of last names to initials

    Here's my code, thanks for any assistance! Set objExcel = CreateObject("Excel.Application") objExcel.DisplayAlerts = False strWB = "D:\content\Tournament." Set objWorkbook = objExcel.Workbooks.Open(strWB & "xls") objExcel.ActiveSheet.Rows("1:7").Delete...
  6. VegasPat

    VBScript help to convert a column of last names to initials

    I have a script that opens an Excel document and I would like to have it take the values of the last name column and replace them with just the first character. I have created a objRange for the column and tried using REPLACE, LEFT & MID with no luck. I will post my script when I get back to...

Part and Inventory Search

Back
Top