Results 1 to 9 of 9

Thread: Multiple IF's Formula Help!!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    13
    @DocE

    Why do you use 'Let' ??

    Code:
    sub M_snb()
      cells(1,12)="170.110.000."& choose(instr("FHSV",left(cells(1,6),1)),"415015","415025","415030","143015")& ".0000.0000.000.000"
    end sub
    PS.
    - most of the time multiple ifs can be replaced by an algorithm that reflects an underlying pattern.
    in this case e.g. "4150" & 5*instr(" F HSV",left(cells(1,6),1))
    - It might be worthwhile to study systematically every function in Excel, starting with text, information, etc.

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Hi snb
    Quote Originally Posted by snb View Post
    .......
    Code:
    sub M_snb()
      cells(1,12)="170.110.000."& choose(instr("FHSV",left(cells(1,6),1)),"415015","415025","415030","143015")& ".0000.0000.000.000"
    end sub
    ........
    _ Another one ! !! The ways to do stuff in VBA is never ending!!!
    _...............................................
    Quote Originally Posted by snb View Post
    @DocE
    Why do you use 'Let' ??
    http://www.excelfox.com/forum/showth...page2#post9459
    http://www.excelfox.com/forum/f2/spe....html#post9459

    _...............................................


    Quote Originally Posted by snb View Post
    ........
    PS.
    - most of the time multiple ifs can be replaced by an algorithm that reflects an underlying pattern.
    in this case e.g. "4150" & 5*instr(" F HSV",left(cells(1,6),1))
    - It might be worthwhile to study systematically every function in Excel, starting with text, information, etc.

    _- Thanks for that. Worth bearing in mind.

    _ I hope i get time to check it all out. But it is a rather a lot!!!.... _
    _ In the meantime it is great to get help from other, more experienced people.

    Alan

    P.s. I expect for real ( lots of ) data the VLookUp would still be the best, especially if data may be added later.... although you could write a program to produce the formula string.... But as said... the ways to do stuff in VBA is never ending!
    Last edited by DocAElstein; 08-01-2016 at 02:27 PM.

Similar Threads

  1. Replies: 6
    Last Post: 12-23-2013, 04:07 PM
  2. Nested If Formula With Multiple Conditions
    By lprc in forum Excel Help
    Replies: 10
    Last Post: 04-22-2013, 07:27 PM
  3. Vlookup Multiple Values By Adding Formula With Loop In VBA
    By Safal Shrestha in forum Excel Help
    Replies: 15
    Last Post: 04-22-2013, 04:49 PM
  4. Replies: 2
    Last Post: 03-21-2013, 10:38 PM
  5. Replies: 3
    Last Post: 03-12-2013, 12:54 PM

Posting Permissions

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