+ Reply to Thread
Results 1 to 15 of 15

Multiple IF/Then assignments

Hybrid View

  1. #1
    Registered User
    Join Date
    10-25-2007
    Posts
    85
    OK here is an example of what I'm trying to get it to look like. The ID number is the Conc. number I was talking about. Those last digits, the 164532 dictates how many columns there will be. That particular person has 6 calculations because of that. The next person would only have 5. What I want to do is set up an If/then statement that would check to see how many digits the ID has and based on that populate the correct columns with the formula I used in that example sheet. The max ends up being 11 seperate calculations and the minimum is one.

    So it'd be like
    If column A has X digits then column B = that formula else column B is blank

    and of course i'd make one for each of the different parameters, I just need to know the formatting that will make it actually fill out those columns.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-25-2007
    Posts
    85
    Sub ChoiceOne()
    Agent = Sheet4.Columns(1)
    FirstChoice = Sheet4.Columns(6)
    If Agent > 1 Then
    FirstChoice = (Mid(Sheet4.Columns(5), 8, 1) & Left(Sheet4.Columns(5), 7)) * 1
    Else
    FirstChoice = ""
    End If
    End Sub
    That is the code i've got in place now

    Fixed
    Last edited by Rgaherty; 10-29-2007 at 02:40 PM.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    In B2 and copied down and right,

    =IF(LEN($A2) >= COLUMNS($A2:B2) + 6, MID($A2, COLUMNS($A2:B2) + 6, 1) & LEFT($A2, 7), "")

+ 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