Dividing a Range Containing a Formula by the Same Value

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Dividing a Range Containing a Formula by the Same Value

Post by grovelli »

I'd like to divide the range S6:W17 in the attached file by the value in cell G2 but when I copy the value in G2 and "Paste Special" it using the divide option, the values in W6:W17 get all wrong because they depend on the values in columns S and V. How can I solve this?
You do not have the required permissions to view the files attached to this post.
Last edited by grovelli on 30 Aug 2023, 10:52, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Dividing a Range Containing a Formula by the Same Value

Post by HansV »

Perhaps only divide S6:V17 by the value of G6? Because of the formulas in W6:W17, the values in that range will change automatically.
Best wishes,
Hans

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Dividing a Range Containing a Formula by the Same Value

Post by grovelli »

Of course :bash:
Thank you Hans

snb
4StarLounger
Posts: 584
Joined: 14 Nov 2012, 16:06

Re: Dividing a Range Containing a Formula by the Same Value

Post by snb »

I'd suggest:

in W6: =(IF($S6>0;$S6;$K6)+V6)/$G$2

Numberformat "0,000"

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Dividing a Range Containing a Formula by the Same Value

Post by grovelli »

As the final formula I'm using =IF((IF($S6>0;$S6;$J6)+$V6)>=0;(IF($S6>0;$S6;$J6)+$V6);0). I don't think there's the need to use "/$G$2" as the formula components are already divided by the content of the G2 cell using Paste Special.

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Dividing a Range Containing a Formula by the Same Value

Post by HansV »

You can shorten that to

=MAX(IF($S6>0;$S6;$J6)+$V6;0)
Best wishes,
Hans

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Dividing a Range Containing a Formula by the Same Value

Post by grovelli »

:thankyou:

snb
4StarLounger
Posts: 584
Joined: 14 Nov 2012, 16:06

Re: Dividing a Range Containing a Formula by the Same Value

Post by snb »

Copy/paste is unnecessary when using the formula I suggested.