Results 1 to 8 of 8

Thread: Excel Help Needed Please.

  1. #1
    Jay
    Jay is offline
    Gentlemen.. we're history Jay's Avatar
    Join Date
    Aug 2006
    Location
    Jita
    Posts
    8,365
    Thanks
    304
    Thanked
    568 times in 409 posts

    Excel Help Needed Please.

    Hi,

    I have a set of Access Version numbers in a colum I need to convert into Access Version name

    =IF(ISNUMBER(SEARCH("10*",L4)),"Access XP")

    The above says if L4 has the number 10 with any numbers after then it is Access XP, what I can't work out is how I can then say if it is 11* its Access 2003 etc

    I would normamly add a +then IF again but that doens't work at all.

    Can anyone help here?

    thanks
    □ΞVΞ□

  2. #2
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,231
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Re: Excel Help Needed Please.

    I think you need to nest IF statements. I quick check of Office help suggests that the syntax is IF(condition,true result,false result). If that's right, your statement should look like:

    =IF(ISNUMBER(SEARCH("10*",L4)), "Access XP", IF(ISNUMBER(SEARCH("11*",L4)),"Access 2003"[, ... ]))

    if the search finds "10*" it returns Access XP, if it doesn't it returns the result of the second IF statement. Then if you need to check for more versions you add another IF statement where I've put the square brackets.

  3. Received thanks from:

    Jay (08-02-2013)

  4. #3
    Jay
    Jay is offline
    Gentlemen.. we're history Jay's Avatar
    Join Date
    Aug 2006
    Location
    Jita
    Posts
    8,365
    Thanks
    304
    Thanked
    568 times in 409 posts

    Re: Excel Help Needed Please.

    That just errors with a #Value! error
    □ΞVΞ□

  5. #4
    Senior Member
    Join Date
    Jul 2009
    Location
    West Sussex
    Posts
    1,721
    Thanks
    197
    Thanked
    243 times in 223 posts
    • kompukare's system
      • Motherboard:
      • Asus P8Z77-V LX
      • CPU:
      • Intel i5-3570K
      • Memory:
      • 4 x 8GB DDR3
      • Storage:
      • Samsung 850 EVo 500GB | Corsair MP510 960GB | 2 x WD 4TB spinners
      • Graphics card(s):
      • Sappihre R7 260X 1GB (sic)
      • PSU:
      • Antec 650 Gold TruePower (Seasonic)
      • Case:
      • Aerocool DS 200 (silenced, 53.6 litres)l)
      • Operating System:
      • Windows 10-64
      • Monitor(s):
      • 2 x ViewSonic 27" 1440p

    Re: Excel Help Needed Please.

    Quote Originally Posted by Jay View Post
    That just errors with a #Value! error
    You can solve those by using Tools>Formula Auditing>Evaluate Formula and trace one part of the formula.

    But actually in this case scaryjim's example has the 2nd nested IF's not true part listed as [] but to test with just two nested if you'd replace that with something like ,""
    So:
    =IF(A1="true1","true one",IF(A1="true2","true two",""))
    Where the last bit is what you'd want if the 2nd IF is false: for example if you wanted a third IF there you'd go something like this:
    =IF(A1="true1","true one",IF(A1="true2","true two",IF(A1="true3","true tree","")))

  6. Received thanks from:

    Jay (08-02-2013)

  7. #5
    Jay
    Jay is offline
    Gentlemen.. we're history Jay's Avatar
    Join Date
    Aug 2006
    Location
    Jita
    Posts
    8,365
    Thanks
    304
    Thanked
    568 times in 409 posts

    Re: Excel Help Needed Please.

    It was how I was closing the brackets

    Incorrect

    =IF(ISNUMBER(SEARCH("10*",L4)),"Access XP"), IF(ISNUMBER(SEARCH("11*",L4)),"Access 2003")

    Correct

    =IF(ISNUMBER(SEARCH("10*",L4)),"Access XP", IF(ISNUMBER(SEARCH("11*",L4)),"Access 2003"))
    □ΞVΞ□

  8. #6
    Senior Member grayg1's Avatar
    Join Date
    Jan 2007
    Posts
    661
    Thanks
    10
    Thanked
    31 times in 27 posts
    • grayg1's system
      • Motherboard:
      • Asus P8Z77-V LX
      • CPU:
      • i5 3570k
      • Memory:
      • 24GB Patriot Viper 3 (x2 8GB, x2 4GB)
      • Storage:
      • Crucial 240GB M500 | 1TB Samsung F3
      • Graphics card(s):
      • MSI R9 270X 4GB
      • PSU:
      • Corsair HX650
      • Case:
      • Nanoxia DS1

    Re: Excel Help Needed Please.

    I take it you want this to work all the way down the "L" column. I could probably create a program using VBA to do this but strangely I'm not very good with Excel formulas!

    Edit: Oh well I see you solved it. For the hell of it I have written some code which would do it anyway, just needs adding to a button.

    Dim varRowNumber As Integer

    Sub Button1_Click()

    varRowNumber = 1

    Do Until Sheet1.Range("L" & varRowNumber) = ""
    If Sheet1.Range("L" & varRowNumber) Like "7*" Then
    Sheet1.Range("L" & varRowNumber) = "Access 95"
    ElseIf Sheet1.Range("L" & varRowNumber) Like "8*" Then
    Sheet1.Range("L" & varRowNumber) = "Access 97"
    ElseIf Sheet1.Range("L" & varRowNumber) Like "9*" Then
    Sheet1.Range("L" & varRowNumber) = "Access 2000"
    ElseIf Sheet1.Range("L" & varRowNumber) Like "10*" Then
    Sheet1.Range("L" & varRowNumber) = "Access XP"
    ElseIf Sheet1.Range("L" & varRowNumber) Like "11*" Then
    Sheet1.Range("L" & varRowNumber) = "Access 2003"
    ElseIf Sheet1.Range("L" & varRowNumber) Like "12*" Then
    Sheet1.Range("L" & varRowNumber) = "Access 2007"
    ElseIf Sheet1.Range("L" & varRowNumber) Like "14*" Then
    Sheet1.Range("L" & varRowNumber) = "Access 2010"
    ElseIf Sheet1.Range("L" & varRowNumber) Like "15*" Then
    Sheet1.Range("L" & varRowNumber) = "Access 2013"
    End If
    varRowNumber = varRowNumber + 1
    Loop

    End Sub
    Last edited by grayg1; 08-02-2013 at 01:10 PM.

  9. #7
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,231
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Re: Excel Help Needed Please.

    Quote Originally Posted by grayg1 View Post
    I take it you want this to work all the way down the "L" column. I could probably create a program using VBA to do this but strangely I'm not very good with Excel formulas!
    You can use autofill once you've got it right on the first line, and it'll intelligently update the formula to look at the current line

    If I knew more about the problem at hand I'd probably have suggested putting it into Access, but then I'm a database nerd, so of course I'd suggest that! We all have our own way of doing things - that's why tech and development teams have to be so closely managed and carefully handled...

  10. #8
    Senior Member
    Join Date
    Jan 2013
    Location
    West Sussex
    Posts
    530
    Thanks
    50
    Thanked
    44 times in 33 posts
    • Chadders87's system
      • Motherboard:
      • Asus P8Z77-I Deluxe
      • CPU:
      • Intel i5 3570k
      • Memory:
      • Corsair Vengeance 8GB (2x4GB) 1600mhz
      • Storage:
      • Western Digital Caviar Black 1TB (Sata3)
      • Graphics card(s):
      • Sapphire AMD Radeon 7870 2GB
      • PSU:
      • BeQuiet 450w (140mm)
      • Case:
      • BitFenix Prodigy
      • Operating System:
      • Windows 7 Home Premium
      • Monitor(s):
      • Samsung 21.5'
      • Internet:
      • Sky Unlimited

    Re: Excel Help Needed Please.

    I would have used a slightly different formula:

    =IF(left(L4,2)=10,"Access XP", IF(LEFT(L4,2)=11,"Access 2003","Neither XP or Access"))

    Both would work as well as each other though.
    Last edited by Chadders87; 08-02-2013 at 09:30 PM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •