+ Reply to Thread
Results 1 to 4 of 4

Macro/function for this formula

  1. #1
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    399

    Macro/function for this formula

    Can this be put into a macro/function?

    Please Login or Register  to view this content.
    Last edited by Richard Buttrey; 07-11-2008 at 02:55 PM. Reason: Code tags more appropriate than Quote Tags

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    That's some hell of a formula.

    Can you describe what you're trying to achieve, there may be a more elegant way of going about it. Perhaps a sample workbook would help so that we could see the formula in its context.

    Rgds

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Based on the somewhat regular structure, I suspect this is a mistake:

    =IF(OR( A18=P!$B$9, A18=P!$B$10, A18=P!$B$11, A18=P!$B$12, A18=P!$B$13, A18=P!$B$14, A18=P!$B$15, A18=P!$B$16), P!$A$21,
    IF(OR(A18=P!$B$17, A18=P!$B$18, A18=P!$B$19, A18=P!$E$29), P!$A$22,
    IF(OR(A18=P!$E$31, A18=P!$E$32, A18=P!$E$33, A18=P!$E$34), P!$A$32,
    IF(OR(A18=P!$E$14, A18=P!$E$15, A18=P!$E$16, A18=P!$E$17, A18=P!$E$18, A18=P!$E$19, A18=P!$E$20, A18=P!$E$21, A18=P!$E$22), P!$A$26,
    IF(OR(A18=P!$E$9, A18=P!$E$10, A18=P!$E$11), P!$A$20,
    IF(OR(A18=P!$E$23, A18=P!$E$24, A18=P!$E$25, A18=P!$E$26, A18=P!$E$27, A18=P!$E$28), P!$A$27,
    IF(A18=P!$E$13, P!$A$28, Payroll!$G$2) ) ) ) ) ) )


    I agree with Richard that there ought to be a simpler way -- like using VLOOKUP.
    Last edited by shg; 07-11-2008 at 07:27 PM.

+ 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