+ Reply to Thread
Results 1 to 14 of 14

If cell contains 'text' then another cell will automatically contain 'SUM'

Hybrid View

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    Alfreton
    MS-Off Ver
    Excel 2003
    Posts
    22

    If cell contains 'text' then another cell will automatically contain 'SUM'

    Hi All,

    I’d like to create a formula that would mean………
    If the word ‘float’ is inserted into a cell in column C then………….
    Column E & F will automatically add up the totals above and…………
    Column G will be the sum of E-F

    (an example of the end result being in row 7)

    any ideas?

    Thanks

    Edit: I forgot to add that also if a cell does contain the word 'float' then it automatcally turns grey too :S Thanks
    Attached Files Attached Files
    Last edited by AngieBramley; 07-11-2012 at 06:11 AM. Reason: Addition

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Will there be multiple such occurrences in your data or just 1?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    06-26-2012
    Location
    Alfreton
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    There will be multiple,

    So a total per 'work shift' then one at the end of the day, or week etc.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    You mean you need a total per work shift, then at the end of the day, week, etc?

    Can you upload a sample containing such data?

  5. #5
    Registered User
    Join Date
    06-26-2012
    Location
    Alfreton
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Sorry but I'm not sure I understand what it is you mean :S

    I do not have a sample containing the data, only the worksheet which I've origianally attached to the initial post.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    You said there will be multiple sections of data and on every occurrence of "Float", the required changes need to take place.

    How will the data for the next day be displayed? Will there be blank rows between each day's data or will it just be continuous?

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Hi

    If i understand correctly, you put manually the values in columns E & F??? If YES, then you can not use formulas in the same cells.. You can get your resulys in Column H, probably using 2 helper columns... Is this OK, for you?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  8. #8
    Registered User
    Join Date
    06-26-2012
    Location
    Alfreton
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Quote Originally Posted by Fotis1991 View Post
    Hi
    If i understand correctly, you put manually the values in columns E & F???
    Yes, that's correct

    Quote Originally Posted by Fotis1991 View Post
    If YES, then you can not use formulas in the same cells..
    Oh ok , something new I've learned
    Quote Originally Posted by Fotis1991 View Post
    You can get your resulys in Column H, probably using 2 helper columns... Is this OK, for you?
    Making an extra column for them would be fine. As long as the 'SUM' and subsequently 'Bal' infor (column F) is there it's not important which column they're in.

  9. #9
    Registered User
    Join Date
    06-26-2012
    Location
    Alfreton
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Oh sorry, I think i misunderstood what was asked. It appears my lack of excel knowledge and terminology has managed to confuse things I'll see if I can try to explain what I'm planning on doing.

    The spreadsheet will be filled in as and when a purchase is made, or money goes in and out etc. At any time I'd like to be able to type the word 'float' in column C. This will then automatically make column E & F 'SUM' up the data above and Column G will give a reading of the balance (E-F).

    Then I'd like to be able to carry on adding data underneath and, again at any point, type in the word 'float' which will bring up the total of the WHOLE column (even before the previuos 'float' was typed.

    Does this make more sense? Excel really is a genuis tool, but a very confusing one!

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    So a couple of more questions -

    1. You want the sums to be calculated as soon as you type "float" ?

    2. At every instance of "Float", you want the sum of the whole column upto that row? And not the sum of data from the 1st "float" to the 2nd "float", right?

  11. #11
    Registered User
    Join Date
    06-26-2012
    Location
    Alfreton
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Quote Originally Posted by arlu1201 View Post
    1. You want the sums to be calculated as soon as you type "float" ?
    Yes
    Quote Originally Posted by arlu1201 View Post
    2. At every instance of "Float", you want the sum of the whole column upto that row?
    Yes
    Quote Originally Posted by arlu1201 View Post
    And not the sum of data from the 1st "float" to the 2nd "float"?
    No, NOT the sum of data between the 'float'(s)
    Quote Originally Posted by arlu1201 View Post
    right?
    Yep, that's right
    Last edited by AngieBramley; 07-11-2012 at 07:30 AM. Reason: mis-quoted

  12. #12
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Try in G3 and copy down.


    =IF(C3="Float",SUM($E$3:E3)-SUM($F$3:F3),"")
    Is this, works for you?

  13. #13
    Registered User
    Join Date
    07-01-2010
    Location
    High Wycombe
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Hello,

    When your adding in the floats & wanting it to sum up everything above, I am assuming you want the previous floats to not be included?

    EG:

    Line 1 - £10.00 in | £5.00 Out
    Line 2 - £15.00 in | £10.00 Out
    Line 3 - Float (Sum of Line 1 & 2)
    Line 4 - £10.00 in | £5.00 Out
    Line 5 - £15.00 in | £10.00 Out
    Line 6 - Float (Sum of Line 1 & 2 & 4 & 5, ignoring the previous float).

  14. #14
    Registered User
    Join Date
    06-26-2012
    Location
    Alfreton
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: If cell contains 'text' then another cell will automatically contain 'SUM'

    Quote Originally Posted by Fotis1991 View Post
    Is this, works for you?
    Thank you

    Quote Originally Posted by Jamesr571 View Post
    When your adding in the floats & wanting it to sum up everything above, I am assuming you want the previous floats to not be included?

    EG:

    Line 1 - £10.00 in | £5.00 Out
    Line 2 - £15.00 in | £10.00 Out
    Line 3 - Float (Sum of Line 1 & 2)
    Line 4 - £10.00 in | £5.00 Out
    Line 5 - £15.00 in | £10.00 Out
    Line 6 - Float (Sum of Line 1 & 2 & 4 & 5, ignoring the previous float).
    Yes that's correct

+ 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