+ Reply to Thread
Results 1 to 7 of 7

Please help

  1. #1
    holyman
    Guest

    Please help

    Hoping someone can help....as couldn't find anything relevant in the forum.

    In sheet 1, I have coulmns of data that includes below. In sheet 2 i need
    to return the highest value that is in column B if column A is 'Kerry
    Beniston1'. In this instance it would be 22Kerry Beniston.
    If it could just return the value of 22, that would be even better, but if
    necessary, can live with the whole text.

    Please can anyone help. Many thanks


    Column A Column B
    KERRY BENISTON0 0KERRY BENISTON
    KERRY BENISTON0 0KERRY BENISTON
    KERRY BENISTON0 0KERRY BENISTON
    KERRY BENISTON1 16KERRY BENISTON
    KERRY BENISTON1 17KERRY BENISTON
    KERRY BENISTON1 22KERRY BENISTON
    KERRY BENISTONFALSE 1KERRY BENISTON


  2. #2
    Marcelo
    Guest

    RE: Please help

    Hi Holyman,

    I have a sugestion for you, not sure if it's the best way but...

    use the this function to extract just the digits of the text string,

    ************************************************
    Public Function DigitsOnly(sStr As String) As Variant
    Dim oRegExp As Object

    Set oRegExp = CreateObject("VBScript.RegExp")

    With oRegExp
    .IgnoreCase = True
    .Global = True
    oRegExp.Pattern = "\D"

    DigitsOnly = oRegExp.Replace(sStr, vbNullString)
    End With
    End Function
    ***********************************************
    create a column between A and B with the function =abs(digitsonly(c2)) copy
    it down

    on the sheet2 use a vlookup as
    =vlookup(max(sheet1!b2:b100),sheet1!b3:c100,2,0)

    hth
    regards from Brazil
    Marcelo





    "holyman" escreveu:

    > Hoping someone can help....as couldn't find anything relevant in the forum.
    >
    > In sheet 1, I have coulmns of data that includes below. In sheet 2 i need
    > to return the highest value that is in column B if column A is 'Kerry
    > Beniston1'. In this instance it would be 22Kerry Beniston.
    > If it could just return the value of 22, that would be even better, but if
    > necessary, can live with the whole text.
    >
    > Please can anyone help. Many thanks
    >
    >
    > Column A Column B
    > KERRY BENISTON0 0KERRY BENISTON
    > KERRY BENISTON0 0KERRY BENISTON
    > KERRY BENISTON0 0KERRY BENISTON
    > KERRY BENISTON1 16KERRY BENISTON
    > KERRY BENISTON1 17KERRY BENISTON
    > KERRY BENISTON1 22KERRY BENISTON
    > KERRY BENISTONFALSE 1KERRY BENISTON
    >


  3. #3
    holyman
    Guest

    RE: Please help

    It needs to be a formula, and the formulas below does not work for the data.
    Has anyone got any other suggestions?

    "Marcelo" wrote:

    > Hi Holyman,
    >
    > I have a sugestion for you, not sure if it's the best way but...
    >
    > use the this function to extract just the digits of the text string,
    >
    > ************************************************
    > Public Function DigitsOnly(sStr As String) As Variant
    > Dim oRegExp As Object
    >
    > Set oRegExp = CreateObject("VBScript.RegExp")
    >
    > With oRegExp
    > .IgnoreCase = True
    > .Global = True
    > oRegExp.Pattern = "\D"
    >
    > DigitsOnly = oRegExp.Replace(sStr, vbNullString)
    > End With
    > End Function
    > ***********************************************
    > create a column between A and B with the function =abs(digitsonly(c2)) copy
    > it down
    >
    > on the sheet2 use a vlookup as
    > =vlookup(max(sheet1!b2:b100),sheet1!b3:c100,2,0)
    >
    > hth
    > regards from Brazil
    > Marcelo
    >
    >
    >
    >
    >
    > "holyman" escreveu:
    >
    > > Hoping someone can help....as couldn't find anything relevant in the forum.
    > >
    > > In sheet 1, I have coulmns of data that includes below. In sheet 2 i need
    > > to return the highest value that is in column B if column A is 'Kerry
    > > Beniston1'. In this instance it would be 22Kerry Beniston.
    > > If it could just return the value of 22, that would be even better, but if
    > > necessary, can live with the whole text.
    > >
    > > Please can anyone help. Many thanks
    > >
    > >
    > > Column A Column B
    > > KERRY BENISTON0 0KERRY BENISTON
    > > KERRY BENISTON0 0KERRY BENISTON
    > > KERRY BENISTON0 0KERRY BENISTON
    > > KERRY BENISTON1 16KERRY BENISTON
    > > KERRY BENISTON1 17KERRY BENISTON
    > > KERRY BENISTON1 22KERRY BENISTON
    > > KERRY BENISTONFALSE 1KERRY BENISTON
    > >


  4. #4
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    A pivot table would allow you to filter for all kerrybeniston1's. The fields in your second column would be in the pivot table rows, eg 11kerrybeniston, 17kerrybeniston etc etc.

    use the large worksheet function to find the biggest field in the list, it might be obvious anyway if you sort the data "descending" in the pivot table.

  5. #5
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    A pivot table would allow you to filter for all kerrybeniston1's. The fields in your second column would be in the pivot table rows, eg 11kerrybeniston, 17kerrybeniston etc etc.

    use the large worksheet function to find the biggest field in the list, it might be obvious anyway if you sort the data "descending" in the pivot table.

  6. #6
    holyman
    Guest

    Re: Please help

    Robert,

    thanks for that..........I would do that, but I'm needing a formula result
    as the result is then dependant on other formaulas that I have within the
    spreadsheet. A pivot table can't help in this instance.

    Is there a formula out there?

    "robert111" wrote:

    >
    > A pivot table would allow you to filter for all kerrybeniston1's. The
    > fields in your second column would be in the pivot table rows, eg
    > 11kerrybeniston, 17kerrybeniston etc etc.
    >
    > use the large worksheet function to find the biggest field in the list,
    > it might be obvious anyway if you sort the data "descending" in the
    > pivot table.
    >
    >
    > --
    > robert111
    > ------------------------------------------------------------------------
    > robert111's Profile: http://www.excelforum.com/member.php...o&userid=31996
    > View this thread: http://www.excelforum.com/showthread...hreadid=562628
    >
    >


  7. #7
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    a bit convoluted but this works, see attachment. you will need to merge all the intermediate fomulas if you cannot have dummy columns
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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