Results 1 to 4 of 4

Help in VBScript....

Threaded View

  1. #1
    Registered User
    Join Date
    09-11-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    10

    Help in VBScript....

    Hi,

    I have script that returns row number after string match, but i want value of that cell

    like table

    name id
    JJ 1
    JK 7

    in this case if i search JK it returns 2 not 7 and i want 7

    please see the code below

    ======================

    Dim Input
    Input = InputBox("Please enter Name")

    Set objExcel = CreateObject("Excel.Application")
    objExcel.Visible = False
    strExcelFile = "C:\Users\Desktop\test1.xlsx"
    objExcel.Workbooks.Open strExcelFile

    strValue = Input
    lngRowNum = objExcel.Match(strValue, objExcel.ActiveSheet.Range("A1:A4"), 0)

    MsgBox lngRowNum

    Please suggest me where i need to change the code...
    Last edited by abhijit2610; 01-21-2016 at 09:38 AM. Reason: change

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Converting VBA to VBScript
    By dlow in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-26-2015, 10:18 PM
  2. Macro in VBScript
    By pushpita in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2014, 02:54 AM
  3. [SOLVED] vbscript pattern
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2014, 03:05 AM
  4. CSV/XLS via VBScript
    By Leonidars in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-13-2012, 08:24 AM
  5. VBScript.RegExp
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-27-2010, 09:20 PM
  6. Please help with ADO and VBScript!
    By jenhu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2006, 01:10 PM
  7. [SOLVED] Excel & VBScript
    By Bill Ebbing in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-08-2005, 02:05 PM

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