+ Reply to Thread
Results 1 to 11 of 11

Help, need to find and grab a value within a cell

  1. #1
    Registered User
    Join Date
    05-21-2017
    Location
    austin,tx
    MS-Off Ver
    2016
    Posts
    8

    Help, need to find and grab a value within a cell

    so in column "a" there is a number within a string of text and the text is never the same.
    before the two digit number i am trying to find and use, there is a bracket and string of text which is the only constant value to reference from. example "[AA 11"

    i have well over 1000 rows and the bracket and AA are always constant. i need to save this as a integer variable.

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Help, need to find and grab a value within a cell

    Can you provide a sample workbook?
    It sounds like the number always starts at the 5th character, and goes until the end of the string?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    05-21-2017
    Location
    austin,tx
    MS-Off Ver
    2016
    Posts
    8

    Re: Help, need to find and grab a value within a cell

    i dont have the workbook on my computer sadly.
    picture a random set of words or a string of text that could be sentence length, anywhere from 4 characters to 20 characters(my guess) within the cell.
    "[AA xx" where xx is two random numbers and a random string of text after too.

    basically, if a code like this could be made, a find command for "[AA", skip a character and grab the next two values and save as an integer.

    Sorry if i make this complicated.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Help, need to find and grab a value within a cell

    Hi,

    here is a start...

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-21-2017
    Location
    austin,tx
    MS-Off Ver
    2016
    Posts
    8

    Re: Help, need to find and grab a value within a cell

    ill definitely save this, but the number im trying to save is not in a static position, so this wont work.
    but a start this is indeed, thanks.

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Help, need to find and grab a value within a cell

    I am not sure i understand.... You said it starts with bracket AA space then number.... Now you say not a static position? If you could give some actual data that represents what we are dealing with I can help, otherwise Im lost

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Help, need to find and grab a value within a cell

    Is the idea here that there is always a space before the number you want to extract? And if so, is it the first/only space?

  8. #8
    Registered User
    Join Date
    05-21-2017
    Location
    austin,tx
    MS-Off Ver
    2016
    Posts
    8

    Re: Help, need to find and grab a value within a cell

    CNT XJDFJTS01-1938 ben [AA 24-AJAX-424
    METRO DHEYUDIX [AA 12]

    example, every row is different, but the "[AA" with a space right after is a constant reference.

  9. #9
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Help, need to find and grab a value within a cell

    Ok, is it always AA? Or do those letters change?

    And first example has a dash and letters again after 24.... You only want the 24 in that example?
    Last edited by Arkadi; 06-01-2017 at 07:49 PM.

  10. #10
    Registered User
    Join Date
    05-21-2017
    Location
    austin,tx
    MS-Off Ver
    2016
    Posts
    8
    Quote Originally Posted by Arkadi View Post
    Ok, is it always AA? Or do those letters change?

    And first example has a dash and letters again after 24.... You only want the 24 in that example?
    It is always AA and the numbers after are always different, but will remain 2 characters.

  11. #11
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,357

    Re: Help, need to find and grab a value within a cell

    Please Login or Register  to view this content.
    Now the question remains of what you want to do with the number found.
    Last edited by bakerman2; 06-01-2017 at 10:49 PM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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. [SOLVED] Grab and Display Last Cell
    By azbi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-16-2015, 01:08 AM
  2. [SOLVED] Find Value in Sheet Named After Cell and Grab Specific Cell Value
    By Caulerpa in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-21-2013, 02:21 PM
  3. [SOLVED] VBA to Grab every third cell
    By seannydj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-01-2012, 12:25 AM
  4. If cell contains, grab.
    By matt.smith315 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-01-2012, 03:00 PM
  5. Grab Last 7 Characters of a Cell
    By Zan03 in forum Excel General
    Replies: 2
    Last Post: 04-26-2010, 09:58 AM
  6. Grab sheet name from a cell
    By qaz4321@this.net in forum Excel General
    Replies: 2
    Last Post: 08-12-2009, 03:44 PM
  7. find the last occurence of an account and grab an invoice number?
    By rmsjazz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-05-2005, 12:10 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