Solved

# Copy the formula in excel

Posted on 2016-11-25
57 Views
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
Question by:Peter Parker
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 95

Expert Comment

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

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 95

Expert Comment

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

Author Comment

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

LVL 95

Assisted Solution

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 33

Assisted Solution

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

ID: 41908277
Thank you so much.
0

LVL 95

Expert Comment

ID: 41908516
You are welcome and I was happy to help.
0

## Featured Post

Question has a verified solution.

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

### Suggested Solutions

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original souâ€¦
Excel can be a tricky bit of software to get your head around. Whilst youâ€™ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to dâ€¦
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
###### Suggested Courses
Course of the Month7 days, 21 hours left to enroll