+ Reply to Thread
Results 1 to 11 of 11

Row offset formula assistance.

  1. #1
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Row offset formula assistance.

    Hi

    I need to adjust the below formula to offset the rows in my two tabs 'Booking In' & 'Booking Out ITFC' in my new sheet in the next available blank row. at the moment, it is inserting it into the corresponding row in the new sheet so not in chronological order when new data is added.

    Please Login or Register  to view this content.
    I would be very grateful for any assistance possible.

    Many thanks in advance.
    Last edited by milo1984; 08-29-2012 at 10:21 AM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Row offset formula assistance.

    By the looks of it, at the moment your formula will list all of the entries on the Booking In sheet, and then all of the entries on the Booking Out sheet - are you saying that you want to intersperse them so that they're all listed in chronological order?

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Row offset formula assistance.

    Unless you have some sort of date/time column which allows you to determine the chronological order of entry, then you can't do what you want with a formula... if I understood correctly.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Row offset formula assistance.

    Hi Andrew

    Many thanks for your response.

    At the moment, it takes the entries in Booking In and Out sheets and lists them in a new sheet (where the formula is located). I have attached a trial workbook to show what is happening. The entries in Booking In are inserting in the list instead of attaching onto the end.

    Trial workbook.xlsx

    Many thanks once again in advance.

  5. #5
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Row offset formula assistance.

    Hi NBVC. There will be a date in the booking in/ out sheets which will be offset when the barcode is entered. I have got the same formula for Column B and C...

    I hope that this answers your point.

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Row offset formula assistance.

    Milo,

    So, on your trial sheet, if I changed the date on the 2nd booking-in entry to 30/8/12 you'd want the history sheet to list the 1st booking-in entry, then the booking out entry and then the 2nd booking-in entry, is that correct?

    Any formula would, as NBVC points out, have to work on that date column. So even if we modified your formula in the trial workbook to look at dates the output would still be exactly as it is with the inputs you've provided, as there's no data held on which order the entries were made in.

    If you do want a log of changes made to either sheet then you'd almost certainly be better off using a macro - would that be acceptable?

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Row offset formula assistance.

    If we can assume that you want to chronologically order the barcodes (hopefully), then to avoid VBA we can use a helper column or 2.

    So, say in History sheet, choose an empty column like N, and in N2 put your formula from column A:

    Please Login or Register  to view this content.
    copied down

    and in adjacent column enter:
    Please Login or Register  to view this content.
    copied down.

    Then in A2 use formula:

    Please Login or Register  to view this content.
    in B2:

    Please Login or Register  to view this content.
    and in C2:

    Please Login or Register  to view this content.
    each copied down.

    Does that work for you?
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Row offset formula assistance.

    Hi

    That is fantastic. Thank you so much for your help. and in such a short space of time.

    I really appreciate it.

  9. #9
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Row offset formula assistance.

    Hi Andrew and NBVC

    Having tried your method, I have come across a reason for me not to be able to use it.

    The purpose of this is to track the movements of barcodes. The same barcodes will be booked in and out so putting them in order of barcode number won't work. I changed the small to now() in VBA so that it tracks changes by date and then doing a vlookup on the barcode to return the date into the History tab. This is not working because it is finding the first date and returning it for all the duplicate records.

    I don't mind if we need to use VBA to do this. I could only find subs though. I need a private sub worksheet_change etc....

    Is this possible?

    Many thanks for your help once again.

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Row offset formula assistance.

    Yeah, I think your best bet is the event macro, but unfortunately VBA is out of my scope on these forums.. I will have to defer it to a VBA expert....

  11. #11
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Row offset formula assistance.

    Thank you very much for your earlier assistance.

    I will still try and adapt your formula. There must be a way to make it work.

+ 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