+ Reply to Thread
Results 1 to 6 of 6

IF, THEN or ????

  1. #1
    Registered User
    Join Date
    09-24-2014
    Location
    Dayton, Ohio
    MS-Off Ver
    2013
    Posts
    2

    IF, THEN or ????

    Hello, I am trying to complete a worksheet to record the hours of training by category for a fire department. On one sheet each training is listed with Course _Name, Date, Category, Hours_Offered. Then the trainer lists each attendees ID code in a range of cells in the same row.

    Then EACH firefighter has his or her own sheet. I want to automatically populate the individual sheets using the training sheet as reference. Here's my dilemma: How do I tell Excel, If the number in cell B3 appears in the range of cells on the attendee list J1-AM1, then return the value of hours from cell D1, if not, return 0.

    I tried using LOOKUP but it returns the hours whether the ID is in the list or not (unless I am doing it wrong….which I may be).

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: IF, THEN or ????

    Upload a sample file
    ________________________________________________________
    If your problem is solved, update the thread as SOLVED: Go to the top of the first post-Select Thread Tools-Select Mark thread as Solved OR - Go to the first post - Click edit- Click Advance- Just below the word "Title:" you will see a dropdown with the word No prefix.- Change to Solve- Click Save.

    Show your gratitude to the person who helped you solving your problem by clicking on star button at the bottom of such post.

  3. #3
    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

    Re: IF, THEN or ????

    ... but before you go too far with this I'd seriously consider why you are using separate sheets for each 'training' and a sheet for each firefighter.

    I suspect you are making the same mistake that I see time and time again. You are mixing up the two elements of data capture and final reporting. The two require quite different treatments.


    A lot of people start by designing the form that they expect to see as the final report, and then wonder why it's so difficult to subsequently analyse and summarise or extract information from it, I suspect yours may exhibit all those features.


    You should always capture data in a simple two dimensional table and worry about reporting information from it afterwards. Without exception doing this you will always be able to easily obtain management information. Rarely is this the case if you start the other way round.
    You will also throw open the whole wonderful world of the powerful Pivot table functionality.

    Upload the workbook and explain what you want to achieve with it and no doubt we can point you in the right direction.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: IF, THEN or ????

    Hey Teach, looks like the match functions is prob the way to go:

    =IF(ISNA(MATCH(B3,J1:AM1,0)),0,D1)

    Let us know how it works out.
    You either quit or become really good at it. There are no other choices.

  5. #5
    Registered User
    Join Date
    09-24-2014
    Location
    Dayton, Ohio
    MS-Off Ver
    2013
    Posts
    2

    Re: IF, THEN or ????

    I have attached a sample file to help me solve an issue.

    The goal is to add all trainings to the Data Entry Tab, then using the formulas in the Doe sheet, it automatically populates cells on the Doe sheet. You can see that it worked for the first two rows and then it quits working. Any ideas???
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: IF, THEN or ????

    See the file.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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