LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default public function to sum input and return total sum + 10%

Can someone quickly tell me if I'm on the right path?

I'm manually entering a pile of invoices to finalise end of month
payments but because the supplier changed the format of the invoices I
have to manually enter the cell values such as:

RENT Variable Outgoings
=((100+200)*1.1) + ((250+900)*1.1)

this needs to be done as the GST is calculated on each individual item.

I was trying to make a public function but I can't figure out the
input.

What I want to do is in a cell enter the following
=igst(100,200,250,900) and the function will return the correct result.

But I get errors.

This is what I've done.

-------------------------------------------------------------------------------------
Public Function igst(range) As Double

Dim sumarray As Double
igst = 0

sumarray = DSum(igst) * 10
gst = sumarray

End Function
-------------------------------------------------------------------------------------

Maybe a for loop would work?

 
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
Public Function Question Carl Excel Worksheet Functions 7 August 31st 06 08:15 PM
Using A Public Function / carl Excel Worksheet Functions 1 April 6th 06 09:13 PM
public function tom mcdonald[_4_] Excel Programming 2 October 10th 05 01:51 PM
Public Function to Return ColorIndex Fries Excel Discussion (Misc queries) 2 July 28th 05 09:23 AM
Public Function Monty Excel Discussion (Misc queries) 9 December 24th 04 06:35 PM


All times are GMT +1. The time now is 06:43 AM.

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"