+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    07-07-2008
    Location
    Bath
    MS-Off Ver
    Microsoft Office 2007
    Posts
    42

    Arrow Looking at a cell and deciding which formula to use

    Hi,

    I've ran into a small problem. I'm a novice regarding excel so any help is welcome.

    I have a spreadsheet, where I would need to make following:

    - look in the row (11 and 12) for the following values: Unkown and Totals:

    If Unkown is found then I would need following executed: =VLOOKUP($B11,MPC!$B$2:$D$10,3,FALSE)

    If Totals: is found then the following:
    =SUM(G4:G11)

    Thanks for any help.

    Regards,
    George

  2. #2
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,447

    Re: Looking at a cell and deciding which formula to use

    Your post does not comply with Rule 5 of our Forum RULES. We have Seven question forums: Miscellaneous, General, Programming, Worksheet Functions, Charting, Excel 2007 Help and New Users. Please choose the appropriate forum, and post your question in ONLY one forum.

    Moved to Functions Forum
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

  3. #3
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,479

    Re: Looking at a cell and deciding which formula to use

    look in the row (11 and 12)
    doesn't tell us much, is that in a specific column?
    best you attach a work book with sensitive data removed showing what you need,
    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    07-07-2008
    Location
    Bath
    MS-Off Ver
    Microsoft Office 2007
    Posts
    42

    Re: Looking at a cell and deciding which formula to use

    Hi Martin,

    Thanks for the quick reply.

    I've attached text.xls, I hope I included everything.

    In my reports some of the tables will have Unknown and some of them won't. In B9:D12 values are copied over from another workbook. In E9:H12 are formulas which work with these data. But sometimes I will get Unkown and I will have to be able to make a difference in link 11 and 12 to be sure which formula is applied.

    Thanks,
    George
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-07-2008
    Location
    Bath
    MS-Off Ver
    Microsoft Office 2007
    Posts
    42

    Arrow Re: Looking at a cell and deciding which formula to use

    Any ideas?

    Thanks,
    G.

  6. #6
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,479

    Re: Looking at a cell and deciding which formula to use

    stiil not clear but
    =if(b11="unknown team",some formula here,normal formula here)
    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    07-07-2008
    Location
    Bath
    MS-Off Ver
    Microsoft Office 2007
    Posts
    42

    Re: Looking at a cell and deciding which formula to use

    Hi Martin,

    This helped thanks. Could you please let me know, if there's a formula that would allow me to:

    Leave the cells E12:H12 empty if B2 is empty, but if it has value then applying the code provided by you (=if(b11="unknown team",some formula here,normal formula here)

    Thanks,
    G.

  8. #8
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,479

    Re: Looking at a cell and deciding which formula to use

    if you mean b12
    =if(b12="","",if(b12="unknown team",some formula here,normal formula here))
    or 0 instead of blank
    =if(b12="",0,if(b12="unknown team",some formula here,normal formula here))
    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Registered User
    Join Date
    07-07-2008
    Location
    Bath
    MS-Off Ver
    Microsoft Office 2007
    Posts
    42

    Re: Looking at a cell and deciding which formula to use

    Hi Martin,

    Thanks for all your help.

    It look like it works

    George

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.2.0