Solved

Copy the formula in excel

Posted on 2016-11-25
8
48 Views
Last Modified: 2016-12-01
Hi Experts

I am having a hard time in trying to figure out, how to drag the formula in Column E towards the right side, in such a manner that the correct values get calculated for each of the columns till column O.

Please suggest a method to do this. I have attached the file.Copy-the-Formula-towards-Right.xlsx
I am using Microsoft Excel Professional 2016 x64

Thanks for any help
0
Comment
Question by:Peter Parker
8 Comments
 
LVL 92

Expert Comment

by:John Hurst
ID: 41902033
Highlight the cell(s) (click on them). Look at the lower right. There is a little square. Pick that up with your mouse and drag to the right as far as you wish. I do this a lot.
0
 
LVL 1

Accepted Solution

by:
Frank Batusic earned 250 total points
ID: 41902096
The issue I see is that in your formula you have set your Column to be absolute (by the dollar sign in front of the column reference.  In order to be able to simply select and drag to copy and get the expected outcome you need to remove the dollar sign.
Current Formula = "= SMALL($E$17:$E$186,1)"
Recommended Formula = "= SMALL(E$17:E$186,1)"

You would need to correct this in cell E7 then copy it to cells E8:E11.  At that point, you can select cell E7:E11 then drag to expand the selection and the formula will be correct.  I have attached a corrected version of your file.  I have also created a simple Macro named "CopyFormula" that will copy the formulas in Column E to Columns F through O (assuming you have corrected the formula for all cells in column E).

Hope this helps.
Copy-the-Formula-towards-Right.xlsm
0
 
LVL 92

Expert Comment

by:John Hurst
ID: 41902097
Formulas will copy with / without the Constant ($) but you just need to be aware of what is being copied.
0
 

Author Comment

by:Peter Parker
ID: 41902251
Thanks for your replies experts. Actually I do know how to simply drag the formulas to the right hand side, by using the little square at the right bottom side.

What I am trying to ask in this case is that, if there is any method to use similar method of copying the formulas to the right hand side, when the formula actually INVOLVES an ABSOLUTE Reference, as in the current example ?

Or if there is no easy way to copy such formulas to the right side, and I will need to first change the formulas from Absolute to Relative Reference, in all such cases ?

Suppose our formula consists of two parts, one of which must have an Absolute Reference, and the second part has a relative reference. Now the dragging method will automatically create the correct second parts, as they are relative. But how do I get the first part in the correct fashion, so that it takes the value from each column respectively, as mentioned in first post.

I am sorry if it sounds confusing.
0
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.

 
LVL 92

Assisted Solution

by:John Hurst
John Hurst earned 125 total points
ID: 41902282
If you use the drag method to copy, it will copy an Absolute reference, a Relative reference, or a combination., Try it for one cell. It is a simple copy/paste.

I use this, just tested it and it works.
0
 
LVL 32

Assisted Solution

by:Rob Henson
Rob Henson earned 125 total points
ID: 41903819
Hi Peter,

Just to mention, the Absolute or Relative element of a cell reference can apply to row and column separately; eg you can have Absolute row reference and Relative column reference. With this option when copied across columns will adjust but when copied down the rows will stay the same.

When in Edit mode in the cell, you can use the F4 key to toggle through the various combinations. With the cursor next to a cell reference it will adjust only that cell reference, with a range highlighted it will adjust the range.

The sequence of toggles are:
   Absolute Row & Column
   Relative Column, Absolute Row
   Absolute Column, Relative Row
   Relative Row & Column

Hope that helps
Rob H
0
 

Author Closing Comment

by:Peter Parker
ID: 41908277
Thank you so much.
0
 
LVL 92

Expert Comment

by:John Hurst
ID: 41908516
You are welcome and I was happy to help.
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

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

912 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