Solved

copy excel formula with index value also changing

Posted on 2011-03-25
4
218 Views
Last Modified: 2012-05-11
Hello, I'm looking to copy the below formula down a couple hundred rows.

=INDEX($C$2:$E$2,MATCH(SMALL($C2:$E2,1),$C2:$E2,0))

when I copy and paste , the index value does not change and I would like it to

results from copy
=INDEX($C$2:$E$2,MATCH(SMALL($C3:$E3,1),$C3:$E3,0))

what I would like to happen
=INDEX($C$3:$E$3,MATCH(SMALL($C3:$E3,1),$C3:$E3,0))

thanks,
shawn
0
Comment
Question by:smcelroy
  • 2
4 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 250 total points
ID: 35218694
Use:

=INDEX($C2:$E2,MATCH(SMALL($C2:$E2,1),$C2:$E2,0))

Kevin
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 35218698
Remove the Dollar signs before copying.
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35218702
A relative reference means that the row or column reference is relative to the referencing cell and, when the formula is copied to other cells, the relative cell references are shifted such that the distance or offset between the referencing cell and the referenced cell remains the same. An absolute cell reference means that the row or column reference is fixed and does not change when the formula is copied to other cells.

With the A1 reference style a dollar sign is used to create an absolute reference. For example, the cell reference A$1, when copied to other cells, will always reference row 1 but the column may change if copied to another column. The cell reference $A$1 will allays reference cell A1 regardless of where it is copied.

Whether a row or column is an absolute or relative reference makes no difference in how the formula is calculated or the result it produces. They only have different effects when formulas are copied to other cells. For this reason, the decision as to whether cell references are absolute or relative should be made with regard to whether or not the formula will be copied to other cells. While entering each cell reference in a formula, consider how the referenced cell should be treated as the formula is copied to other rows and columns. If the referenced cell's row should be the same then make the row an absolute reference by placing a dollar sign in front of the row number. If the column should be the same then place a dollar sign in front of the column letter.

Note that relative references are not shifted when a formula is moved by either cutting and pasting or by dragging. Relative cell references are only adjusted when cells are copied.

Kevin
0
 

Author Closing Comment

by:smcelroy
ID: 35218763
Hi Kevin, thank you for the formula and explanation.

you may be seeing me post again

thanks again,
Shawn
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Moving Excel to AaaS 4 36
Help with Adding text from a form to a worksheet 5 37
InternetExplorer object in Excel VBA. 4 21
Excel copy picture into Outlook email 7 44
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now