Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba code for subtotals and percentages


Tom,

The result I get when I do that is the following: it shows the
percentage and subtotal in column cin Column C instead of column D and
does not automatically do the math. I tried a combination of what you
said to do. do you have any other ideas?? Thank you .


--
pcscsr
------------------------------------------------------------------------
pcscsr's Profile: http://www.excelforum.com/member.php...o&userid=12006
View this thread: http://www.excelforum.com/showthread...hreadid=274838

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default vba code for subtotals and percentages

Cells(n, 3).FormulaR1C1Local = "=.6*r[-1]d"

The 3 says to put he formula in column C. If you want column D, then change
3 to 4

=0.6*r[-1]d

I believe would be the way to manually do the formula in a German version of
Excel (I believe) - so it is my assumption that the formula notation you are
using is they way you would do it manually in your local version. So if you
use formulaR1C1Local, then using the formula as shown above should work. If
you want to use FormulaR1C1 instead, then you would change the d to a c

Cells(n, 3).FormulaR1C1 = "=.6*r[-1]c"

and not use FormulaR1C1Local (just use FormulaR1C1). This is how it would
be entered in an English version of excel and FormulaR1C1 expects English
syntax.

You should do one or the other - not both.

--
Regards,
Tom Ogilvy


"pcscsr" wrote in message
...

Tom,

The result I get when I do that is the following: it shows the
percentage and subtotal in column cin Column C instead of column D and
does not automatically do the math. I tried a combination of what you
said to do. do you have any other ideas?? Thank you .


--
pcscsr
------------------------------------------------------------------------
pcscsr's Profile:

http://www.excelforum.com/member.php...o&userid=12006
View this thread: http://www.excelforum.com/showthread...hreadid=274838



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Percentages of Subtotals for Pivot Tables Craig Excel Discussion (Misc queries) 2 July 26th 08 07:32 PM
percentages of subtotals Miaplacidus Excel Worksheet Functions 1 May 31st 07 08:29 PM
Calculating percentages in pivot tables on subtotals David Ruderman - Chapman University Excel Worksheet Functions 1 November 24th 05 04:54 PM
vba code for subtotals and percentages pcscsr[_7_] Excel Programming 1 November 3rd 04 12:32 PM
**HELP** VBA code to insert subtotals farmer[_2_] Excel Programming 1 May 28th 04 08:24 PM


All times are GMT +1. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"