+ Reply to Thread
Results 1 to 4 of 4

Populating a Row of Cells - With an Absolute Reference That Changes in Each Column

  1. #1
    Registered User
    Join Date
    10-22-2014
    Location
    Earth
    MS-Off Ver
    Office 2010
    Posts
    6

    Populating a Row of Cells - With an Absolute Reference That Changes in Each Column

    Hi,
    I have a large number of excel files containing 300 rows and 600 columns. At the bottom of each column, there is a value which each cell above it needs to be divided by (denominators). I want my output to be a second 300x600 table, with the values in each cell of the output table being the value from the corresponding cell from the initial table divided by the value in the bottom cell of that column.

    As an example, let's call the row that has the denominators Row 300. In row 302, I'll be inputting my formulae. In this example, I would want the following cells to contain the following output:

    A302: =A1/$A$300

    B302: =B1/$B$300

    C302: =C1/$C$300

    ....

    WS302 = WS1/$WS$300

    The issue I am running into is populating this row - I cannot simply drag cell A302 sideways into cell B302, because the absolute reference will not switch from $A$300 to $B$300. Is there a way to create a macro that will populate cells A302 to WS302 with formulae in the above format without having to type the formula 600 times?

  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,461

    Re: Populating a Row of Cells - With an Absolute Reference That Changes in Each Column

    You don't need a macro. Just remove the dollar sign from the column reference(s): $A$300 >>> A$300. Then drag across.


    Regards, TMS
    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
    Registered User
    Join Date
    10-22-2014
    Location
    Earth
    MS-Off Ver
    Office 2010
    Posts
    6

    Re: Populating a Row of Cells - With an Absolute Reference That Changes in Each Column

    Sorry for the belated reply, but your suggestion worked great! Thank you sir!!

  4. #4
    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,461

    Re: Populating a Row of Cells - With an Absolute Reference That Changes in Each Column

    You're welcome. Thanks for the rep.

+ 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] Absolute Reference While Using Cells Function
    By zmster2033 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2014, 11:16 AM
  2. Make cell reference column variable + row absolute?
    By pstein in forum Excel General
    Replies: 3
    Last Post: 06-18-2014, 03:11 AM
  3. Replies: 5
    Last Post: 09-21-2012, 02:08 PM
  4. Remove absolute reference in vlookup column number?
    By Gazpaxo in forum Excel General
    Replies: 4
    Last Post: 09-17-2011, 04:17 PM
  5. Absolute reference to table column in formula
    By jscott15 in forum Excel General
    Replies: 1
    Last Post: 11-03-2010, 01:00 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