+ Reply to Thread
Results 1 to 15 of 15

How to get specific information contained in one celll....

  1. #1
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    How to get specific information contained in one celll....

    Hi All,

    I am trying to get some information contained in a cell on a seperate sheet and put it in another sheet.

    Basically the cell with the information is a drop down. When I select a specific text from the list, I want it to be displayed in another cell with a value indicated in another cell.

    For example,

    A2 = Incidental
    B3 = 2
    A3 = Incidental
    B4 = 4

    If a2:a10 = Incidental, then take sum of b3:b10 and put it in sheet x, A1

    Hope that helps.

    Thank you everybody.

    Newb

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,765

    Re: How to get specific information contained in one celll....

    Try this:

    =SUMIF(Sheet1!A2:A10,"Incidental",Sheet1!B2:B10)

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: How to get specific information contained in one celll....

    Hi All,

    The formula worked however, it did not pull in the sum. It only pulled the first number. Is there a way to incorporate a formula to get the sum?

    Thanks,
    Newb

  4. #4
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: How to get specific information contained in one celll....

    Hi Newb,

    Pete has the right formula...

    Make sure the word "Incidental" is spelled correctly and without extra spaces... my press F9 to calculate.

    Good luck,
    Dennis

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: How to get specific information contained in one celll....

    @ newbie, you can post your workbook if you still have difficulties i think the problem how your data are sorted

    i notice this:

    A2 = Incidental
    B3 = 2
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  6. #6
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: How to get specific information contained in one celll....

    Hi All,

    Please see link to workbook.
    https://www.yousendit.com/directDown...experience=bas

    You all are wonderful. Thank you

    Newb

  7. #7
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: How to get specific information contained in one celll....

    I just found out how to attach this file on this forum.

    CDemo.xlsm

    Thanks again,

    Newb

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: How to get specific information contained in one celll....

    One problem is your merge cells, any way you could possible re-structure your workbook and not to use merge cells?

  9. #9
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: How to get specific information contained in one celll....

    Unfortunately, I can't do that as it adds to the functionality for the add and delete buttons. Is there any way around this?

    Thanks,
    Newb

  10. #10
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: How to get specific information contained in one celll....

    Hi newbie,

    Here's a solution...
    =SUM((Action_Items!$B$7:$B$34="Incidental_Approved")*Action_Items!$E$7:$E$34)+SUM((Action_Items!$B$7:$B$34="Incidental_Approved")*Action_Items!$E$8:$E$35)

    Copy this one big formula in A2 then instead of just Enter... press Control-Shift-Enter...

    Notice the Column E are "slightly" off in the 2 sum functions to capture both...

    Let me know if you have any questions.

    Take care,
    Dennis

  11. #11
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: How to get specific information contained in one celll....

    I think this will work too... without the Ctrl-Shift-Enter...

    =SUMIF(Action_Items!$B$7:$B$34,"Incidental_Approved",Action_Items!$E$7:$E$34)+SUMIF(Action_Items!$B$7:$B$34,"Incidental_Approved",Action_Items!$E$8:$E$35)

  12. #12
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: How to get specific information contained in one celll....

    Hello All,

    Thank you so much for your help, but I am still having trouble with the formula. The problem is when I click the add button, it inserts a row and when I input a value there, it doesn't add that into the formula. I will need to find a way around this and it is very odd that the total sum doesn't pick up the additional inserted rows.

    Is there any way around this?

    Newb

  13. #13
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: How to get specific information contained in one celll....

    The only other way I can think of is to assign one column (you can hide it if needed) that refers to the Type.

    Here's your revised spreadsheet with a couple of added things...
    1. Added column B (which I hid) and it referes to the Type column
    2. Revised your macros to copy the Type column to the Add code
    3. Changed the SUMIF function to refer to the hidden col. B

    CDemo2.xlsm

    Let me know what you think...

    Take care,
    Dennis
    Last edited by djapigo; 10-03-2012 at 04:01 PM.

  14. #14
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: How to get specific information contained in one celll....

    Hi Dennis,

    Thank you so much for helping me with this problem. Is there anyway to create a code that says if a person clicks on add button, it will auto populate the type in column b from column c?

    Thanks,
    Newb

  15. #15
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: How to get specific information contained in one celll....

    Look at my simple code... it should give you an idea... I wanted to add the formula, so I put quotes around the formula... otherwise, for numbers, don't include the quotes... sorry, it's pretty basic, I'm no VBA expert...

    You might want to ask in a different thread in the VBA forum...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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