+ Reply to Thread
Results 1 to 4 of 4

Dragging down formulas in one sheet according to the number of lines in a different sheet

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    Bratislava, SK
    MS-Off Ver
    Office Pro Plus 2016
    Posts
    42

    Dragging down formulas in one sheet according to the number of lines in a different sheet

    Hi guys,

    I tried to be as descriptive as possible in the title, but it's probably not clear, so here goes.

    I have an Excel file which uses data pasted from a different Excel report.

    The report contains lots of unnecessary columns, and is horribly formatted, so I first have the report data pasted to my Excel in sheet "Paste Here", and then I have a second sheet "Summary" which pulls only the relevant data from the "Paste Here" sheet, and adds a number of calculations and lookups, etc.

    I have all the necessary formulas ready on line 2 of the "Summary" sheet, from col. A to col. R. Now all I need is VBS to select line 2 from A to R, then drag down for the same amount of lines as there are in "Paste Here" (the length of the source report is variable each week).

    So for ex. if "Paste Here" has 97 lines, I'd need line A2->R2 in "Summary" to be dragged to line 97.

    I'm sure this is simple, but I'm having trouble finding what I need, so I'd appreciate any help.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Dragging down formulas in one sheet according to the number of lines in a different sh

    Attach a sample workbook not image!)

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Dragging down formulas in one sheet according to the number of lines in a different sh

    Perhaps.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    07-24-2013
    Location
    Bratislava, SK
    MS-Off Ver
    Office Pro Plus 2016
    Posts
    42

    Re: Dragging down formulas in one sheet according to the number of lines in a different sh

    Norie,

    That's what I was looking for. Thank you

+ 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. Reference to another sheet, dragging formulas and skipping rows
    By ospreyguy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-07-2016, 03:37 PM
  2. How to change work sheet number will dragging a formula
    By itsajanrs in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-04-2014, 01:23 PM
  3. Replies: 4
    Last Post: 11-29-2012, 12:07 PM
  4. Replies: 2
    Last Post: 05-01-2012, 09:14 PM
  5. Using a macro to sort and subtotal, but different number of lines on each sheet
    By kafarrell in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-21-2010, 05:26 PM
  6. [SOLVED] Dragging formulas with sheet names
    By carrera in forum Excel General
    Replies: 3
    Last Post: 03-23-2006, 04:55 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