+ Reply to Thread
Results 1 to 6 of 6

Place values (0s and 1s) into desired columns (column L,M,N and O)

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Place values (0s and 1s) into desired columns (column L,M,N and O)

    Looking for formula to place values (0s and 1s) into column L,M,N and O. Data Table is from A1:H83.

    For column N heading (Before-After Tax) and O heading (Before-After Employee Tax Deduction), formula should be setup to look into column G (Employee Name), i (Status 2) and place 1 in column N and 1 in column O if G column has a name in it and column i has "After". If there is no name in column G (Employee Name) and there is "After" in column i, formula should be setup to return blank.

    Column L (Most Sales) and M (Non-Sales), formula should be setup to look into column G (Employee Name), i (Status 2), J (Sales City Occurrence) and column K (Sales Type) and place 0 in column L (Most Sales) and 1 in column M (Non-Sales) if G column has a name in it , column i has "Before", column J has number greater than 1 and column K has only B in it. If column J (Sales City Occurrence) has only 1 has its number value, formula should return 1 in column L and M. If there is no name in column G (Employee Name), there is "Before" in column i and there is A in column K, formula should be setup to return blank.

    Also need a formula (non-array (without CTRL + ALT + ENTER) is preferred to reduce computing time due to over 50,000 rows of data) to return Sales City Occurrence in column J (it is manually entered but will like a formula to return this value for just year 1999 through 2001 using column C Sales Year heading (C2:C83).

    See sample attached file.

    Thanks.
    Last edited by bjnockle; 04-05-2020 at 03:05 PM.

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

    Re: Place values (0s and 1s) into desired columns (column L,M,N and O)

    Please try at

    L2
    =IF((G2="")+(I2="After"),"",(J2<2)*(K2="B"))

    M2
    =IF((G2="")+(I2="After"),"",1)

    N2:O2
    =IF(($G2="")+($I2="before"),"",1)

  3. #3
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Place values (0s and 1s) into desired columns (column L,M,N and O)

    Bo_Ry: Great work! Also need a formula (non-array (without CTRL + ALT + ENTER) is preferred to reduce computing time due to over 50,000 rows of data) to return Sales City Occurrence in column J (it is manually entered but will like a formula to return this value for just year 1999 through 2001 using column C Sales Year heading (C2:C83).

    See sample attached file.

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

    Re: Place values (0s and 1s) into desired columns (column L,M,N and O)

    How do you calculate column J ?

    No Ctrl+Shift+Enter doesn't improve speed, some function like Sumproduct, Lookup, Aggregate can handle array without CSE, but still do the array calculation.

    Small(IF require CSE but faster than Aggregate(15,6 with normal Enter

  5. #5
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Place values (0s and 1s) into desired columns (column L,M,N and O)

    Bo_Ry: How do you calculate column J ? You calculate column J by counting Sales City total occurrence in Column B from year 1999 through year 2001. For example, 4Kor total occurrence is 3. Thanks.

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

    Re: Place values (0s and 1s) into desired columns (column L,M,N and O)

    Please try at J2

    =IF(I2="Before",COUNT(INDEX(1/COUNTIFS($B$2:$B$83,B2,$C$2:$C$83,{1999,2000,2001}),)),"")

    This is array formula, calculate 3 countifs in 1 cell. but index can handle array calculation. no need CSE.

+ 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. Replies: 8
    Last Post: 03-29-2020, 01:00 PM
  2. Place text values into desired columns
    By bjnockle in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-25-2020, 06:02 PM
  3. Place values into desired results column based on year & names
    By bjnockle in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-25-2020, 05:29 AM
  4. Formula to up the code to the desired place
    By reimar_rem in forum Excel General
    Replies: 1
    Last Post: 05-10-2018, 11:09 AM
  5. vba help to delete the column till values met desired header
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-14-2014, 07:32 AM
  6. Replies: 0
    Last Post: 08-03-2012, 04:31 PM
  7. [SOLVED] Count number of times two columns have desired values
    By Gavin Deveau in forum Excel General
    Replies: 2
    Last Post: 06-16-2006, 01:35 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