+ Reply to Thread
Results 1 to 7 of 7

Read Cell Value and distribute value equally

  1. #1
    Registered User
    Join Date
    08-13-2019
    Location
    India
    MS-Off Ver
    2013
    Posts
    10

    Read Cell Value and distribute value equally

    2% Y
    25% Y
    15% Y
    10% N
    5% Y
    5% Y

    Consider two columns in the table,Col A and Col B
    I need to write a formula where I read the cell value of Col B first.

    IF ColB cell value is 'Y', I skip the cell and check the next cell in Col B. If cell Value is 'N', I need to pick the corresponding cell value in Col A, distribute the value across the whole column equally.

    For instance in the above example, B4 is N ,I pick 10% and distribute 10% in the rest of cells of Column A. i.e. add 1.66 in each of the rows in Col A and update that value in Col A as 0
    Last edited by AliGW; 09-17-2020 at 02:54 AM. Reason: Irrelevant section of title removed - we do not prioritise posts, however urgent you think they are.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: *Urgent* Read Cell Value and distribute value equally

    Where does "1.66" come from? Could you show us the "AFTER" outcome for each row?
    Quang PT

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,782

    Re: Read Cell Value and distribute value equally

    You might want to go back and thank those who helped you here before.

    By the way, nothing is treated as urgent here: it's a free help forum, not a paid service.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    08-13-2019
    Location
    India
    MS-Off Ver
    2013
    Posts
    10

    Re: *Urgent* Read Cell Value and distribute value equally

    Hi Sorry for the confusion.
    I miscalculated.

    So basically in the above example, I pick those cell value in Col A where corresponding cell value in Col B is 'N', in this case it's B4, and hence I pick A4 which is 10%

    The goal is to divide 10% equally in the rest of the remaining rows of Col A. i.e (value of cell/rows in col A) (10/5=2%) So I'll add 2% to each row in Col A and make A4 as 0

    After table:

    4% Y
    27% Y
    17% Y
    0% N
    7% Y
    7% Y


    Please reach out for further clarity. Much appreciated

  5. #5
    Registered User
    Join Date
    08-13-2019
    Location
    India
    MS-Off Ver
    2013
    Posts
    10

    Re: *Urgent* Read Cell Value and distribute value equally

    Quote Originally Posted by bebo021999 View Post
    Where does "1.66" come from? Could you show us the "AFTER" outcome for each row?

    Hi Sorry for the confusion.
    I miscalculated.

    So basically in the above example, I pick those cell value in Col A where corresponding cell value in Col B is 'N', in this case it's B4, and hence I pick A4 which is 10%

    The goal is to divide 10% equally in the rest of the remaining rows of Col A. i.e (value of cell/rows in col A) (10/5=2%) So I'll add 2% to each row in Col A and make A4 as 0

    After table:

    4% Y
    27% Y
    17% Y
    0% N
    7% Y
    7% Y


    Please reach out for further clarity. Much appreciated

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Read Cell Value and distribute value equally

    Data % is in A1:A6, "Yes/No" is in B1:B6,

    Next column, C1 use:

    =(B1="Y")*(A1+SUMIF($B$1:$B$6,"N",$A$1:$A$6)/COUNTIF($B$1:$B$6,"Y"))




    Drag down
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-13-2019
    Location
    India
    MS-Off Ver
    2013
    Posts
    10

    Re: Read Cell Value and distribute value equally

    Yes this absolutely works fine.
    You're a star. Made my day

    thanks again

+ 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] How to distribute equally among individuals
    By winner656 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-25-2022, 03:30 PM
  2. How to Distribute Values Equally in Excel
    By amarnath98480 in forum Excel General
    Replies: 3
    Last Post: 07-03-2020, 01:40 AM
  3. How to distribute one cell value equally to n numbers of cells?
    By dkirk500 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2020, 08:53 PM
  4. Function to distribute workload equally
    By shaftora in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-27-2018, 04:05 AM
  5. [SOLVED] Distribute assignments equally to employees
    By kunal Shah in forum Excel General
    Replies: 17
    Last Post: 10-09-2015, 03:54 PM
  6. Replies: 1
    Last Post: 04-09-2015, 12:13 AM
  7. Replies: 15
    Last Post: 12-13-2013, 08:23 AM

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