+ Reply to Thread
Results 1 to 12 of 12

Formula that will return the adjacent cell

  1. #1
    Registered User
    Join Date
    10-22-2013
    Location
    Springfield, MA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Formula that will return the adjacent cell

    I am trying to write a formula/function so that if a certain cell has a specific text it will add all adjacent cells and give a total dollar amount?

    I have uploaded an example
    Ex.) so how do I get a total dollar amount for Lowes?

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula that will return the adjacent cell

    Sounds like sumif

    =SUMIF(A1:A100,"Lowes",B1:B100)

    That will sum values in B1:B100 where "Lowes" exists in A1:A100

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

    Re: Formula that will return the adjacent cell

    Can't see your example file, but you can probably use SUMIF for this.

    Hope this helps.

    Pete

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Formula that will return the adjacent cell

    No file uploaded. Here are instructions on how to do it.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that will return the adjacent cell

    I don't see a link to a sample file.

    Try something like this:

    Data Range
    A
    B
    C
    D
    E
    2
    Lowes
    56
    -----
    Lowes
    170
    3
    Penneys
    33
    4
    Lowes
    83
    5
    Lowes
    23
    6
    WallMart
    56
    7
    KMart
    80
    8
    Sears
    48
    9
    Sears
    81
    10
    Lowes
    8

    This formula entered in E2:

    =SUMIF(A2:A10,D2,B2:B10)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    10-22-2013
    Location
    Springfield, MA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula that will return the adjacent cell

    That worked great! Thanks! One more question does case matter? Lowes, lowes, LOWES?

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula that will return the adjacent cell

    No, it's NOT case sensitive.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that will return the adjacent cell

    Quote Originally Posted by Scarle View Post
    That worked great! Thanks! One more question does case matter? Lowes, lowes, LOWES?
    No, case does not matter.

  9. #9
    Registered User
    Join Date
    10-22-2013
    Location
    Springfield, MA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula that will return the adjacent cell

    Excel example.xlsxhere is file

  10. #10
    Registered User
    Join Date
    10-22-2013
    Location
    Springfield, MA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula that will return the adjacent cell

    Thanks again!!!!!

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula that will return the adjacent cell

    You're welcome.

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that will return the adjacent cell

    You're welcome. Thanks for the feedback!

+ 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] Formula to search from keyword list and return adjacent cell
    By Ninja2k in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-31-2013, 08:44 AM
  2. [SOLVED] Add formula if adjacent cell has name in it but remove formula in adjacent cell is blank
    By How How in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2013, 10:42 AM
  3. [SOLVED] Formula needed to return the text adjacent to the cell when found.
    By LMWI65 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-16-2012, 08:18 AM
  4. [SOLVED] return value in adjacent cell or one above if that is blank.
    By Mikeytres in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-29-2012, 03:16 AM
  5. Formula to return text in adjacent cell
    By Jack B in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2007, 09:31 AM

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