+ Reply to Thread
Results 1 to 3 of 3

Beeing able to switch the number of a cell with Indirect and drag the character

  1. #1
    Registered User
    Join Date
    10-25-2011
    Location
    Norrköping Sweden
    MS-Off Ver
    Excel 2003
    Posts
    13

    Beeing able to switch the number of a cell with Indirect and drag the character

    Hello

    Now I have the following:

    =SUM(INDIRECT("P"&$G$3):INDIRECT("P"&$H$4))

    In column P I have a set of data and in G3 and H4 i have certain numbers (for example 19 and 300) that i can switch, so I can choose from what, to what part I want to sum (for example SUM(P19:P300) ). Now I want to be able to drag this forumula to Q, R, S, T etc, just draging it wont do it since P here is locked, putting P on the outside didnt work since Indirect want a reference to a cell, also tried to make a row with P, Q R S T etc but I can't drag that, would I be able to do so that would also solve the problem since I then could refer to those cells in the indirect function.
    Thankfull for any help

    Regards Alexander
    Last edited by Alexander_V; 10-27-2011 at 05:14 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Beeing able to switch the number of a cell with Indirect and drag the character

    Maybe:

    =SUM(INDIRECT(ADDRESS($G$3,COLUMN(P1))&":"&ADDRESS($H$4,COLUMN(P1))))

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    10-25-2011
    Location
    Norrköping Sweden
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Beeing able to switch the number of a cell with Indirect and drag the character

    Thanks alot!

+ 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