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
 
Many thanks to you Fluff

i have to learn a lot of things.
I'm happy to have people like you in my near on my long way

by the way, sorry for my englisch.

regards
Metin
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Glad we could help & thanks for the feedback
 
Upvote 0
Hi,

code works fine ;
Range("N" & CStr(ilkbos + 1)).FormulaR1C1 = "=vlookup(R[0]C[-12],Birimfiyat!r1c2:r102c5,5,false)"

but i must expand this formula. X is integer
i have to add this integer to my formula

i have try;
Range("N" & CStr(ilkbos + 1)).FormulaR1C1 = "=vlookup(R[0]C[-12],Birimfiyat!r1c2:r102c5,5,false)" + X
Range("N" & CStr(ilkbos + 1)).FormulaR1C1 = "=vlookup(R[0]C[-12],Birimfiyat!r1c2:r102c5,5,false) + X "

But it doesn't work.
how can i add a integer to a formula ?

Br,
Metin
 
Upvote 0
Code:
Range("N" & CStr(ilkbos + 1)).FormulaR1C1 = "=vlookup(R[0]C[-12],Birimfiyat!r1c2:r102c5,5,false) + " & X

assuming X is a variable.
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,003
Members
449,203
Latest member
Daymo66

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