+ Reply to Thread
Results 1 to 5 of 5

changing cell references

  1. #1
    Forum Contributor
    Join Date
    06-29-2005
    Posts
    201

    changing cell references

    Hi all

    In my procedure I have a loop that, at a certain point, makes a named range.
    The code I use is:
    Please Login or Register  to view this content.
    Later on in the procedure I use this (in this case) profitcenterCell in a formula that is defined in the code.

    My goal is that in loop 1 the cell reference in the formula is (e.g.) $B$2, in the second loop $L$2, 3rd: $V$2 etc

    My formula:
    Please Login or Register  to view this content.
    The 1st time the code runs (reference $B$2) it runs OK
    The other times it doesn't
    The problem is that the cell ProfitCenterCell changes location, also disrupting the 1st loop

    How can I change the last formula so that it doesn't refer to ProfitCenterCell but to $B$2 in the first loop, in the second loop $L$2, 3rd: $V$2 etc.?

    Thanks in advance
    Hein

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: changing cell references

    You need to post the relevant code
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    06-29-2005
    Posts
    201

    Re: changing cell references

    Hi Roy

    I will make a demo, but that takes some time, and I have the afternoon free

    I will make my demo and post it coming monday
    Hope to see then

    Have a good weekend
    Hein

  4. #4
    Forum Contributor
    Join Date
    06-29-2005
    Posts
    201

    Re: changing cell references

    Hi Roy (and others of course :-)

    I've made the demo as you requested
    I have added comments in the code
    Hopefully they make sense, if you have questions please ask them and I will try to clarify it.

    Thanks for your help
    Hein
    Attached Files Attached Files
    Last edited by Hein; 02-02-2009 at 10:10 AM.

  5. #5
    Forum Contributor
    Join Date
    06-29-2005
    Posts
    201

    Re: changing cell references

    I found a mistake in the Match formula
    In the 3rd section of the formula I messed up
    I have changed this to "0"

    Remains the mistery of the 1st part of the match -formula

    Hopefully somebody knows what to do

    Hein

+ 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