[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 70
  • Last Modified:

Copy the formula in excel

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
Peter Parker
Asked:
Peter Parker
3 Solutions
 
John HurstBusiness Consultant (Owner)Commented:
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
 
Frank BatusicCommented:
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
 
John HurstBusiness Consultant (Owner)Commented:
Formulas will copy with / without the Constant ($) but you just need to be aware of what is being copied.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Peter ParkerAuthor Commented:
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
 
John HurstBusiness Consultant (Owner)Commented:
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
 
Rob HensonIT & Database AssistantCommented:
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
 
Peter ParkerAuthor Commented:
Thank you so much.
0
 
John HurstBusiness Consultant (Owner)Commented:
You are welcome and I was happy to help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now