Populating a Cell Based Off of Two Columns Values
Results 1 to 4 of 4

Thread: Populating a Cell Based Off of Two Columns Values

  1. #1
    New Member
    Join Date
    Jul 2019
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Populating a Cell Based Off of Two Columns Values

    Hello again everyone,

    I have two columns that I want to compare data and fill in a single cell with the SUM of one of those columns.

    The first column is K. The cells are populated from K2:K59. There are 7 different values randomly listed in this column: Custom, Small Industrial, Lighting, SEM, Custom O&M, Prescriptive and Green Rewind. The second column, AT, has numerical values, also populated from AT2:AT259. I want to use a code that looks at column K to see which cells list "Custom." I want it to sum up the numerical values from column AT that correlate to "Custom" and sum up their values into a single cell.

    I tried using this code to start:

    =VLOOKUP(K2:K259,AT2:AT259,2,FALSE)

    However, I feel as though I may need to use an IF and SUM statement to tell it to only look at the cells labeled "Custom" but am not sure how to format it.

    If this doesn't make sense feel free to ask any questions.

    Thanks everyone!

  2. #2
    Board Regular
    Join Date
    Jun 2014
    Location
    Oakland, CA
    Posts
    5,146
    Post Thanks / Like
    Mentioned
    42 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Populating a Cell Based Off of Two Columns Values

    Hi,

    Sounds like you just need SUMIF.

    Use this with the criteria hard coded:

    =SUMIF(K2:K259,"Custom",AT2:AT259)

    Use this with a cell reference for the criteria, you can change A1 to whatever you want to SUM:

    =SUMIF(K2:K259,A1,AT2:AT259)

  3. #3
    New Member
    Join Date
    Jul 2019
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Populating a Cell Based Off of Two Columns Values

    I didn't even think about using the SUMIF function.

    Thank you so much, you made my life about 100 times easier.

  4. #4
    Board Regular
    Join Date
    Jun 2014
    Location
    Oakland, CA
    Posts
    5,146
    Post Thanks / Like
    Mentioned
    42 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Populating a Cell Based Off of Two Columns Values

    You're welcome, welcome to the forum, and thanks for the feedback.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •