+ Reply to Thread
Results 1 to 11 of 11

Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

  1. #1
    Registered User
    Join Date
    07-16-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    11

    Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    Here is an example of what I want.

    Let X be any natural number ≤ 1,048,576
    If cell HX ≠ 0, then cell A(2+X) = "Totals"

    For example:
    If cell H10 ≠ 0 , then cell A(2+10) = A12 = "Totals"

    Let me describe what I am doing. In a given row I am placing three numbers in different columns and then calculating the sum of these numbers (a sub-total) in the right-most column of the given row. In the bottom row of the right most column I am calculating the grand total. Currently, if obtain three subtotals, the grand total is calculated at the very bottom of the page. I want the grand total to automatically two rows from the last sub-total. I want to be able to add an entry and then have the grand total automatically move down again.

    The reason I want to do this is because I do not want a huge amount of blank space between the most recent sub-total and the grand total.

    Is this possible to do in excel?

    I appreciate your help.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    in your cell A12 write formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy it down (as far as you expect the longest possible table could be)
    Best Regards,

    Kaper

  3. #3
    Valued Forum Contributor
    Join Date
    05-11-2013
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    586

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    Hi,

    Are you able to attach a sample from your Data file?
    It may be possible by converting your "Range" to a "Table" as the "Table Total Row" automatically moves down as you add more Rows.
    However, it does depend on how your Data is laid out.

    Regards

    peterrc

  4. #4
    Registered User
    Join Date
    07-16-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    11

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    I have attached a sample of what I am wanting to do under the extension .xlsx . There are two sheets, ¨Statement of Cash Flows¨ and ¨Business Mileage.¨
    ¨Business Mileage¨operates the way I want it to. You will see what I mean if you fill in the boxes, the ¨Total Deduction¨amount will move down
    with each new entry rather than stay at the very bottom.

    I am having an error with the ¨Statement of Cash Flows¨ sheet. The first couple of entries I make will work fine, but as you will see
    on the particular line I stopped on, I am getting the error ¨VALUE!¨when attempting to do the following ¨G11=-D11+E11-F11".

    Take a look for yourself to get the best idea of what is going on.

    Kaper , thank you for your suggestion. I tried it and it got me to this point, which is further than what I was yesterday before reading your response.
    Attached Files Attached Files

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    As "" is only almost the same as empty cell, simple math operations not always work the same.
    My suggestion for column G is (G3 and copy down):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    As opposite to original formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    which from maths point of view shall return identical result the new one shall deal well with "" (treating it as zeros) in columns D:F
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    05-11-2013
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    586

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    Hi,

    I have simply opened your last attachment, clicked "Formulas" then "Show Formulas" and as you can see there are formulas everywhere!
    Are all these formulas supposed to be there?
    Please advise.

    Regards

    peterrc
    Attached Files Attached Files

  7. #7
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    Yes, its for purpose.
    Switch off showing formulas.
    Add Cash or Paypal in B13.
    You can now write other details in this row - say x in C13, some amounts in some of cells D13:F13, and they will be included in totals row, which is now row 15.
    Isn't it what you asked for?

    PS. your attachment to post #6 does not include my proposition of formula for column G copied down (as shown in #5).
    Last edited by Kaper; 07-19-2016 at 03:38 PM.

  8. #8
    Valued Forum Contributor
    Join Date
    05-11-2013
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    586

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    Hi Kaper,

    I think you've got me mixed up with the OP - I was commenting on the OP's (Cloud909) last attachment.

    Regards

    peterrc

  9. #9
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    Sorry peterrc,

    Indeed it sounded like OP post commenting my answer (#5), so I haven't checked who posted. My fault.

    Anyway - I probably answered (hopefully in line with OP's idea) your question.

    Have a good day :-)

  10. #10
    Registered User
    Join Date
    07-16-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    11

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    Thank you for your suggestion. This is exactly what I needed. I took an excel course at my local university, but I'm still learning more now that I'm trying to apply it.

  11. #11
    Registered User
    Join Date
    07-16-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    11

    Re: Moving Cell Contents in a Certain Direction Based on Another Cell's Contents

    The formulas are supposed to be there. I'm making this spreadsheet for a very specific purpose, and once I have finished setting everything up the way I want it, I plan on locking a bunch of cells so it is idiot proof.

+ 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. Moving data to different sheets based on cell contents
    By asml8d in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-25-2017, 04:11 PM
  2. Replies: 3
    Last Post: 06-29-2015, 03:03 PM
  3. [SOLVED] Copy Paste Contents based on contents in designated cell
    By nickmessick1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2014, 01:23 PM
  4. Moving Cell contents with a formula, based on the column value?
    By bvandervyver44 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2013, 02:51 AM
  5. Replies: 0
    Last Post: 05-21-2012, 06:59 AM
  6. Split cell contents over multiple rows based on cell contents
    By naigy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2011, 05:38 PM
  7. Moving rows based on cell contents
    By WasWodge in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2010, 11:27 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