methode2404

New Member
Joined
Sep 3, 2018
Messages
30
Hi,

How can i use "sum" function in ".Formulalocal="
my code in vba :

Range("N" & CStr(ilkbos + 1)).FormulaLocal = "=(R[0]C[-1])+(R[1]C[-1])+(R[2]C[-1])+(R[3]C[-1])+(R[4]C[-1])"

but i would use "sum" function like;

Range("N" & CStr(ilkbos + 1)).FormulaLocal = "=sum(R[0]C[-1]):(R[4]C[-1])"
but it doesn't work

Best Regards
Metin
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
You can use FormulaR1C1 instead:

Code:
Range("N" & CStr(ilkbos + 1)).FormulaR1C1 = "=sum(R[0]C[-1]:R[4]C[-1])"
 
Upvote 0
Hi & welcome to the board.
How about
Code:
Range("N" & CStr(ilkbos + 1)).FormulaR1C1 = "=sum(RC[-1]:R[4]C[-1])"
Too slow :(
 
Last edited:
Upvote 0
Hi,


I have another formula problem, it's doesn't work.
Range("N" & CStr(ilkbos + 1)).FormulaR1C1 = "=vlookup(R[0]C[-12];sheet1!A2:F101;5;false)"


regards
Metin
 
Upvote 0
try replacing the semi-colons, with commas
 
Upvote 0
Hi Fluff,

my code in vba is :
Range("N" & CStr(ilkbos + 1)).FormulaR1C1 = "=vlookup(R[0]C[-12],Birimfiyat!A2:F102,5,false)"

in cell appears it :
=VLOOKUP(B30;BirimFiyat!'A2':'F102';5;FALSE)

it doesn't work :(
 
Upvote 0
As you're using R1C1 notation it should be
Code:
"=vlookup(R[0]C[-12],Birimfiyat!r1c2:r102c5,5,false)"
 
Upvote 0

Forum statistics

Threads
1,215,467
Messages
6,124,985
Members
449,201
Latest member
Lunzwe73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top