+ Reply to Thread
Results 1 to 6 of 6

Centering data in one column between two adjacent rows

  1. #1
    Registered User
    Join Date
    04-10-2017
    Location
    New York
    MS-Off Ver
    2010
    Posts
    19

    Centering data in one column between two adjacent rows

    Hello,

    I'm wondering if it's possible to center data in one column between two adjacent rows without simply merging/centering two cells in one column.

    Here is a picture of what exactly I'm looking to do.

    20170413_095615.jpg

    My company wants to document machine hours every time we change that machine's "tooling."

    I wrote into the cells in the "elapsed" column the correct formula to automatically generate how many hours elapsed between each "tooling change" (so when I enter a new "date of tooling change" and the machine hours at the time of the change, the amount of time that elapsed after the previous tooling change is displayed).

    But I want that information be centered between the hours of the tooling change, much like how I have it in the first two rows in the above picture (which I did by merging and centering the cells in the elapsed column). I want the "19" in my elapsed column to center between the 81 and the 100, etc etc. It doesn't seem possible to center the subsequent elapsed data unless I duplicate rows and merge/center accordingly (as seen in the bottom chart in the above picture), though.

    Any help on this would be much appreciated. Thank you!
    Last edited by gallagt01; 04-13-2017 at 11:18 AM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,585

    Re: Centering data in one column between two adjacent rows

    Hello gallagt01 and Welcome to Excel Forum
    All that I get when attempting to view the picture is an error message saying: "Not Found The requested URL /images/rsz_120170413_095615.jpg was not found on this server."
    It would help us to attempt to help you if you could upload a file rather than a picture. To upload a workbook click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    That said and without being able to see what you wish to accomplish (so this may not be relevant), Merge and Center is not a good option in many cases. A better option is to select the cells you wish to populate, simultaneously press Ctrl and 1, choose the Alignment tab, change the Horizontal text alignment from general to Center across Selection.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    04-10-2017
    Location
    New York
    MS-Off Ver
    2010
    Posts
    19

    Re: Centering data in one column between two adjacent rows

    Quote Originally Posted by JeteMc View Post
    Hello gallagt01 and Welcome to Excel Forum
    All that I get when attempting to view the picture is an error message saying: "Not Found The requested URL /images/rsz_120170413_095615.jpg was not found on this server."
    It would help us to attempt to help you if you could upload a file rather than a picture. To upload a workbook click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    That said and without being able to see what you wish to accomplish (so this may not be relevant), Merge and Center is not a good option in many cases. A better option is to select the cells you wish to populate, simultaneously press Ctrl and 1, choose the Alignment tab, change the Horizontal text alignment from general to Center across Selection.
    Let us know if you have any questions.
    Thank you for the reply and sorry for the inconvenience.

    Here's the picture -- I've also updated the OP to reflect the change.

    20170413_095615.jpg

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,585

    Re: Centering data in one column between two adjacent rows

    This may be of some help. The dates and machine hours are copied to another range and a row is skipped between each date/machine hour entry using the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The elapsed time is then place in the intervening rows using the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    To automatically do much more formatting than this I believe that you would have to use VBA.
    Let us know if you have any questions.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-10-2017
    Location
    New York
    MS-Off Ver
    2010
    Posts
    19

    Re: Centering data in one column between two adjacent rows

    This was definitely helpful. Thank you very much!

    My only question would be, how do you use the formula to copy the data over and skip the row? I can do this manually, and it's not an issue at all, I'm just trying to educate myself in Excel a bit more and that may come in handy.

    Thanks!
    Last edited by gallagt01; 04-18-2017 at 10:27 AM.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,585

    Re: Centering data in one column between two adjacent rows

    The first formula 'skips' the even rows and puts values in the odd rows. The first formula can be pasted into E3 then copied over to F3, then while both those cells are still highlighted the fill handle of F3 may be dragged down as far as necessary. Note that there will come a point at which the formula will begin to return #VALUE because there are no more dates in column A.
    The second formula puts values in the even rows (rows that the first formula leaves blank). The second formula may be pasted into G3 and dragged down as far as necessary. It will also eventually begin to return #VALUE when the data in column C runs out.
    To eliminate the #VALUE displays you could wrap both formulas in the IFERROR function as in:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.

+ 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. Search one column, then rows and the return adjacent cell value
    By K8tieC in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-27-2016, 12:06 AM
  2. VBA to autofill formula row down to other rows where adjacent column is populated
    By jamesr86 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2016, 02:03 AM
  3. Centering across ROWS without merging
    By francisvachon in forum Excel General
    Replies: 5
    Last Post: 04-07-2015, 06:37 PM
  4. Macro that cuts data from lower rows and pastes them in adjacent rows
    By kehl_4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2014, 02:07 PM
  5. VBA to add one column by all values of the adjacent 8 columns and three rows once each
    By amweisberg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2014, 07:48 AM
  6. Selecting n rows in the adjacent column
    By Sathed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2012, 07:20 PM
  7. Replies: 1
    Last Post: 11-16-2011, 02:57 PM

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