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

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

copy paste formula vba

Hi Guys,

I am trying to copy paste a formula down to a certain row.
=MAX(U2:$U$2)-U2

When I use copy/paste.formula,  the exact formula gets copied... (not incrementing the U2 - without the $)

When I use Range.formulaR1C1
the formula changes to
=MAX(U$2:$U3)-U3

Any idea how to make the second copy =MAX(U3:$U$2)-U3
so on and so on??

thansk!!!
0
solarissf
Asked:
solarissf
1 Solution
 
jppintoCommented:
When you copy this:

=MAX(U2:$U$2)-U2

Say from cell B2 and paste it on cell B5 for instance, you will get this:

=MAX(U$2:$U5)-U5

the first U2 changed his position to the end of the range definition so instead of  U5:U$2, wich doesn't make sense, you will get U$2:$U5 because the smallest part of the range will be on the beggining and the biggest on the end.

Hope you understand what I'm trying to say to you.

jppinto
0
 
solarissfAuthor Commented:
pardon my stupidity, my fault

thanks!!!
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