+ Reply to Thread
Results 1 to 6 of 6

VB script to compare text, if not available do something else

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    9

    VB script to compare text, if not available do something else

    Hi Experts,

    This is my first post - I've been reading and getting lots of help on my own.

    What i'm trying to do is build a form for my end users. for a certain field i want them to enter text. i'd like a macro that takes that text and compares it to a set table on another sheet that i've Named.

    Example.

    Cell D19 = spot users will enter data

    Sheet Other A20 - A256 (A20:A256) is the list, i have it named Ext_Mat_Group

    If a users enters a Ext_Mat_Group that is in the list do nothing.
    Else "(What they entered) - NEW"

    Thanks,

    Dex

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VB script to compare text, if not available do something else

    I had to read your post a couple of times because it is a little confusing. Do you mean like this?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-23-2014
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: VB script to compare text, if not available do something else

    Hi Stnkynts,

    To sum everything up i've said in the previous post.

    I want to compare an entered text from the customer with a List that i've named using the Name Manager.

    If the Name is in the list do nothing. if it isn't in the list. i want what they entered to remain and the macro to add -NEW

    I'm going to give your code a shot here and see what happens. i think you can ignore the sheet pages because with the Name Manager it doesn't require me to list out sheets.

    Keep in mind that i'm fiarly new to macro's in Excel and it may be painful for you to understand my lingo

    Thanks!

  4. #4
    Registered User
    Join Date
    01-23-2014
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: VB script to compare text, if not available do something else

    Populated your Code, it works great. i just need it to put the value you in instead of a MsgBox . i was thinking a concatenate of what they typed with -New? (am i complicating things?)

    Regards,
    Dex

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VB script to compare text, if not available do something else

    So you are saying you need to add the new value to the existing named range (Ext_Mat_Group) then resize that named range so it incorporates the new value?

  6. #6
    Registered User
    Join Date
    01-23-2014
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: VB script to compare text, if not available do something else

    No need to add to existing range, just need it to stay in D19 with "-NEW" at the end of what they typed. I'll maintain the existing list from SAP.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA script to compare latest two files and get output to another file
    By arkrish in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2013, 01:17 PM
  2. Compare and copy cells script
    By fuchetj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2011, 08:52 AM
  3. VBA script to compare New and Old Budgets
    By cfo@k in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2010, 11:30 PM
  4. Script that edits the text printed on the button that runs the script
    By petalred in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2008, 02:41 PM
  5. Compare Data Script To check Names
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2008, 11:37 AM

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