+ Reply to Thread
Results 1 to 6 of 6

Add data of same sheet with OFFSET

  1. #1
    Forum Contributor
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    2016 .......
    Posts
    390

    Lightbulb Add data of same sheet with OFFSET

    I have this code which is showing an error
    I want to copy L3 to S3 of sheet2 & paste it on the same sheet from A2:H2 & onwards because values in L3 TO S3 are getting changed at regular intervals, so I want to store the previous value.
    So new value must be added in column A to H after previous value.
    The error line in RED

    Thanks in advance

    Please Login or Register  to view this content.
    Last edited by sanjuss2; 11-15-2022 at 07:29 AM.
    Regards,
    Sanjay SS
    __________________________________________________________________________________________________________________________
    Good Luck !!!
    If you feel I have helped, please click on the star to the left of the post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember......Mark Thread as Solved.
    Excel Forum Rocks!!!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Add data of same sheet with OFFSET

    What is in cell A3 (and below)?


    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    2016 .......
    Posts
    390

    Lightbulb Re: Add data of same sheet with OFFSET

    PFA of file

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Add data of same sheet with OFFSET

    Does the values changed manually. If so, worksheet event can be used to transfer previous data to range A2:H2 automatically. No necessity of macro run.
    You can change this line
    Please Login or Register  to view this content.
    as
    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 11-15-2022 at 07:51 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Add data of same sheet with OFFSET

    In the sample file provided, there is nothing below cell A1. Hence Range("A2").End (xlDown) will take you to the very last row in the worksheet. From that point, you cannot use .Offset(1,0) as it will take you beyond the limit of the sheet.

    The solution in post #4 would not fail but it might not give you the range you want. You need to use a range that is fully populated. That is, has data in the last used row.

  6. #6
    Forum Contributor
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    2016 .......
    Posts
    390

    Re: Add data of same sheet with OFFSET

    Thank you it works... kvsrinivasamurthy
    I will check it on my main file tomorrow...

+ 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] offset and match formula to extract data from another sheet
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-01-2017, 03:05 AM
  2. [SOLVED] copy / paste formula data from one to other sheet has offset vba function
    By Anisusa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-16-2017, 01:01 AM
  3. Copy data from one sheet to naother using offset
    By Biplab1985 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2016, 03:23 PM
  4. Replies: 3
    Last Post: 03-21-2016, 02:01 PM
  5. Replies: 9
    Last Post: 11-07-2014, 07:10 AM
  6. Extracting data from one sheet to another using offset & multiple vlookup
    By Navin Agrawal in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-05-2013, 12:40 AM
  7. Extracting data from the offset of a cell, to be put into a new sheet
    By michaelkwc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2008, 07:08 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