Results 1 to 3 of 3

Convert if statement to Case Function

Threaded View

  1. #1
    Registered User
    Join Date
    05-16-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    7

    Wink Convert if statement to Case Function

    I'm trying to get the following code to work as a Case Function and can't seem to find how i would define the different ranges to test.

    My working VBA IF statement, which populates the column M cells with 410, 470, 430, and 420 depending on what is found in column L, I or A, is:

    Range("M2").Select
    ActiveCell.FormulaR1C1 = _
    "=IF(ISNUMBER(FIND(""MF"",RC[-4])),410,
    IF(ISNUMBER(FIND(""Supply"",RC[-1])),470,
    IF(ISNUMBER(FIND(""Primary"",RC[-12])),430,
    IF(ISNUMBER(FIND(""Junior"",RC[-12])),430,
    IF(ISNUMBER(FIND(""College"",RC[-12])),420,
    IF(ISNUMBER(FIND(""Senior"",RC[-12])),420,430))))))"
    
    Selection.AutoFill Destination:=Range("M2:M" & Range("A" & Rows.Count).End(xlUp).Row), Type:=xlFillDefault
    Edit/Delete Message
    Can anyone help me convert that into a Case Function?
    Last edited by KarlSm; 05-22-2011 at 05:19 PM.

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