+ Reply to Thread
Results 1 to 10 of 10

How to add Value if any one cell in Column equals a specific number?

  1. #1
    Registered User
    Join Date
    03-13-2008
    Posts
    87

    How to add Value if any one cell in Column equals a specific number?

    Hello there,

    I'm trying to get a cell to show a specific number if any one cell on another tab contains that same number.

    Let me show you:
    Tab 1 has column A which is a running list that will contain numbers and sometimes there may be one of the same number or 3 of the same number.
    Please Login or Register  to view this content.
    Then in Tab 2, I want the to list the numbers in the rows of a running list, but only one of the numbers. Basically with the content in Column A above from tab 1 I want tab 2 to have a running list of rows like this:
    Please Login or Register  to view this content.
    Does that make sense?

    I've tried If statements, =IF(ISNUMBER(SEARCH, SumProduct, etc but I can't get it to work.

    Thanks so much,
    Lorne

  2. #2
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How to add Value if any one cell in Column equals a specific number?

    let us say your list of values is on Sheet1 between A1 and A11, then put this formula in Sheet2's cell A2 (put some header, e.g. List, in A1):

    Please Login or Register  to view this content.
    if your version of Excel is 2007, you can use the following for error suppression:

    Please Login or Register  to view this content.
    Last edited by icestationzbra; 08-07-2012 at 09:29 PM.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  3. #3
    Registered User
    Join Date
    03-13-2008
    Posts
    87

    Re: How to add Value if any one cell in Column equals a specific number?

    Thanks for the Post Ice.

    I tried that out and it is showing the number 1 in my column, but how do I do the same thing to show number 2 in the row below it if there is number 2 in the column from the first sheet.

    This is my formula:
    Please Login or Register  to view this content.
    Thanks,
    Lorne

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How to add Value if any one cell in Column equals a specific number?

    if i understand your quandary, i think it may be very easily solved. i forgot to mention that you have to drag-fill the formula down until you start seeing #N/A. try and see if that helps. otherwise post a sample workbook and i will set it up for you.

  5. #5
    Registered User
    Join Date
    03-13-2008
    Posts
    87

    Re: How to add Value if any one cell in Column equals a specific number?

    Ok so I dragged it and now it just shows zeros after it lists the last number. However it lists numbers in the column multiple times if it's in there multiple times. I am wanting Excel to look in colum C4:C100 on sheet 'Additional Services' and if there is the number 1 put it in B3 of 'Admin Summary'. Even if there is 20 1's in the column, I want it listed once. Then in B4, if there are any 2's I want it listed only once.

    Does that make sense? See the attached workbook.

    Thanks so much,
    Lorne
    Attached Files Attached Files

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How to add Value if any one cell in Column equals a specific number?

    you can use the following formula in cell B3 of Admin Summary sheet:

    Please Login or Register  to view this content.
    and then drag-fill down until you start seeing zeroes (0).

    you can use Conditional Formatting to hide 0 appearing on Admin Summary sheet.

    however, if your original data set in 'Additional Services'!$C$4:$C$15 could contain the value 0, please revert.

    i have attached your sample workbook with two different approaches to solving this requirement, in case you are interested in learning.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-13-2008
    Posts
    87

    Re: How to add Value if any one cell in Column equals a specific number?

    Brilliant! Thanks so much, I knew it was a long complicated formula!

    Thanks again,
    Lorne

  8. #8
    Registered User
    Join Date
    03-13-2008
    Posts
    87

    Re: How to add Value if any one cell in Column equals a specific number?

    Ok one last question...

    So now let's say I have a Phase code in column D on sheet 'Additional Services'. How do I input that code on my 'Admin Summary' Sheet if the Mod Number is 1? The Phase code will always be the same for all Mod numbers.

    I attached the file again.

    Thanks,
    Lorne
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-13-2008
    Posts
    87

    Re: How to add Value if any one cell in Column equals a specific number?

    I just figured it out...no idea how I did it, but tried some stuff from another post and it worked!

    Please Login or Register  to view this content.
    That code is taken from my actual spreadsheet, and not my template, but you get the idea.

  10. #10
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How to add Value if any one cell in Column equals a specific number?

    if you put this in Admin Summary sheet's cell C2 and drag-fill down, this will work too:

    Please Login or Register  to view this content.
    here is a file with updated formula for the original problem - with this one, you will get a hyphen instead of a 0 in case of errors. i would recommend using this one.
    Attached Files Attached Files
    Last edited by icestationzbra; 08-08-2012 at 07:22 PM. Reason: updated

+ 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