+ Reply to Thread
Results 1 to 4 of 4

Macro for changing an absolue refrence value within an formula (Row, Columne)?

  1. #1
    Registered User
    Join Date
    05-31-2016
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    11

    Macro for changing an absolue refrence value within an formula (Row, Columne)?

    Hello,

    Im new to this forum, infact this is my first post.

    If anyone knows a way to create a macro for changing an absolue refrence value within an formula (Row, Columne)?

    This is how the formula looks;

    =AVERAGE(IF(Runs!$BH$4:$BH$50000>0;Runs!$BH$4:$BH$50000))

    I want to be able to copy / past this formula where ever i need and then do a short comand for updating the formula with:

    Row + 2
    Column +1

    The macro cant be specific, i want the same macro to work on this formula aswell;

    =STDEV(IF(Runs!$DL$4:$DL$50000>0;Runs!$DL$4:$DL$50000))

    Ive been looking all over for a asolution to this, is it even possible?

    Thanks in advance! :-)

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Macro for changing an absolue refrence value within an formula (Row, Columne)?

    Can you give us the bigger picture? What is happening in the spreadsheet that causes you to want to do this? There may be an alternative solution. I am thinking in terms of a named dynamic range.

    Also if you can attach a sample workbook it would help a lot. It will help us come up with a solution for you.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-31-2016
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Macro for changing an absolue refrence value within an formula (Row, Columne)?

    Thanks for answering,

    I’m sorry but at the moment I don’t have a sample worksheet, due to that I don’t know if I will be able to solve this (with help)

    Basically I will have a worksheet contain lots of raw data, it will be stored column wise, I estimate the data to go up to column "DCR" and be about 15000 rows long.

    In another worksheet I will try to look at this data with median, average and so forth, in this worksheet I will have about 200 unique formulas with in an area of rows, all set to look in specific places in the raw data sheet.

    Now, I want to copy all these 200 formulas, paste them 8 columns to the right, since I made all the formulas with absolute references (to make sure no one accidently move something) they will stay the same as before my copy / paste action but 8 columns to the right. Now, the newly pasted set of formulas (200) need to look 1 column to the right from the original ones and 2 rows down.

    I don’t know if this helps, but since I copy and paste 8 columns / 0 rows and want the formulas to look 1 column and 2 rows down I don’t know how to solve it, I need to do this a roughly 100 times.

    Thanks

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Macro for changing an absolue refrence value within an formula (Row, Columne)?

    Does this data have a column header name? Is it unique? Is the smallest row number 4? Are the leftmost column numbers BH and DL?

    How much can the data be off by? You indicated that it might be shifted down by one row and over by two columns. What are the most likely limits

    I am trying to think of a way to detect the beginning row automatically and from that, the column that contains your data.

    Is there anything above the data? Are the rows above the data blank?

    Are the adjacent columns populated? In other words is there a particular column (for example, Column A) I can select and be assured that the first row in that column is the same as the first row in the column you want to use in your formulas?

+ 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. VBA vlookup with cell refrence in macro
    By MetteGaga in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-06-2015, 06:46 AM
  2. Regression with changing column refrence
    By KapilJain in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2015, 02:17 PM
  3. Formula to refrence a task then look at the value
    By kdugger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-10-2013, 02:14 PM
  4. Same formula refrence off different tabs
    By nightcrawler-jay in forum Excel General
    Replies: 3
    Last Post: 07-04-2012, 10:59 AM
  5. vlookupnth with changing Refrence Cell
    By preond in forum Excel General
    Replies: 6
    Last Post: 03-26-2011, 12:23 AM
  6. Changing a worksheet refrence in multiple cells
    By johnb28 in forum Excel General
    Replies: 5
    Last Post: 07-15-2008, 10:11 AM
  7. An easy way to changing refrence on several charts
    By Henning in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-07-2006, 02:35 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