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: 3
Default I want a special Sum function but I need help with that

I have the following issue, I will make a simplefied explenation here.

I have the Following Data

A B C
1 1
2 V
3 V
4 1
5 1
6
7 V
8 1
9 V
10 1 5

I have to count the total of a predefined, but dynamic range.

The Value of C10 should be the sum of B9:B5 (so 5 rows up). But if for
example the value of A9 is a V, the sum is going to be B9:B4, because
if there is a V in a row, there will be no value in the neighbouring
cell. So you see this is a dynamic calculation and needs a variabel

The Value in column A is ALWAYS V or nothing., The value in Column B is
is always 1 or nothing. The Value in Column C is the Sum.

(This in fact is a part of a calender where I need to calculate the
number of nights people worked in the field. It has to calculate the
number of nights in the field for the last 30 days but If it was a
National Holiday or I toke a day off, the number of absences have to be
added to the 30 days. This was no problem when I had a holiday for 5
days in those 30 days (it should count up to 35 cells) but when someone
has also a holiday on day 32 and 33 I needed to count 37 days etc.....
So in total it will be used in a 335 rows)

I want to do this via a macro in VBA because I want to use and
transform this function for use in other documents as well.

Can someone point me in the good direction? I haven't got much VBA
experience but I need some help.

greets

 
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
Paste Special Function Steven D Excel Worksheet Functions 8 November 3rd 08 06:40 PM
Special Date Function Christopher D Excel Worksheet Functions 1 September 10th 08 07:06 PM
Paste special function richzip Excel Discussion (Misc queries) 2 January 2nd 08 10:59 PM
Special function Bart Steur Excel Worksheet Functions 5 December 30th 05 05:59 PM
special function help needed DanceNFree Excel Worksheet Functions 5 May 10th 05 08:51 PM


All times are GMT +1. The time now is 08:33 PM.

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

About Us

"It's about Microsoft Excel"