+ Reply to Thread
Results 1 to 8 of 8

Applying multiple formulas to multiple columns

  1. #1
    Registered User
    Join Date
    01-10-2019
    Location
    Maine, USA
    MS-Off Ver
    Excel 2016
    Posts
    4

    Applying multiple formulas to multiple columns

    I am very new to excel and am teaching myself "OJT". In an attempt to better track overtime by position, by hour, and by multiple reasons for overtime, I began creating this sheet. I have it nearly exactly as i want it, but cannot apply my formulas to other cells. I need to be able to input multiple letters that will track frequency by generating an updated total (if that makes sense). Cells B54 through B66 have the formulas I need. Currently they only apply to D4. I would like to apply them to all columns titled "code". Can and how is this possible?

    Thanks in Advance!
    Attached Files Attached Files
    Last edited by Ascender; 01-10-2019 at 06:10 PM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: So close, yet so far

    In my opinion your best option is to reload the sheet with some examples in the different code areas ALONG WITH expected results.
    Last edited by Sam Capricci; 01-11-2019 at 06:30 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Applying multiple formulas to multiple columns

    (Thanks for the title change )

    I agree that some sample data - and expected outcome - would help a lot.

    My understanding is that you want a count of each reason code, and for each position, correct?

    Also...
    what are you trying to do with the formulas in B54:B66?
    your SUM formula...=SUM(B10,E10,H10,K10,N10,Q10,T10,)...could be shortened to just =SUM(B10:T10). I doubt you would have values in Reason or Code in that row?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    01-10-2019
    Location
    Maine, USA
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Applying multiple formulas to multiple columns

    FDibbins,
    Correct. For each position, each day, I would like to code overtime reasons A thru M (some days may have multiple reasons for the same position), and in turn, the table below will track monthly total overtime by reason.
    If you look at D4 on this example, it shows one position doing overtime for four different reasons. The table at the bottom has tracked frequency and type of OT for this position on this day. I need to apply this to all cell columns under "code".
    Attached Files Attached Files

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Applying multiple formulas to multiple columns

    Please try B54

    =SUMPRODUCT((LEN($A$3:$V$50)-LEN(SUBSTITUTE($A$3:$V$50,Sheet2!$A2,"")))*(LEFT($A$3:$A$50)="#")*($A$3:$V$3="code"))

    Remove space after "A " at Sheet2!$A2

  6. #6
    Registered User
    Join Date
    01-10-2019
    Location
    Maine, USA
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Applying multiple formulas to multiple columns

    Bo_Ry,
    I believe you misunderstood. The columns under "code" is where I want to input letters that signify what category the overtime was for.

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Applying multiple formulas to multiple columns

    What's wrong with the formula?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-10-2019
    Location
    Maine, USA
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Applying multiple formulas to multiple columns

    Bo_Ry
    That works! Appreciate your help with this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Issue with Open, copy, close Macro - when trying to close workbook Clipboard error
    By seanpcorbett1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2016, 05:14 PM
  2. [SOLVED] Userform Close (x) Check condition before close
    By rr1050 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-07-2016, 06:55 AM
  3. [SOLVED] Auto Close Msg Box after Time Period & Close Workbook
    By GJF36 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-24-2015, 10:25 AM
  4. how to close userform using commndbutton and set automatic close at certain time
    By fatinmunie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2014, 12:51 PM
  5. [SOLVED] VBA Prompt to close PDF so file can be overwrtitten or close automatically
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2014, 12:31 PM
  6. Disable close workbook but still force users to close thru command button
    By rathig in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 07:29 AM
  7. Replies: 0
    Last Post: 06-10-2005, 01:05 PM

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