Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Find Running Total Value or % at a given Target Date or vice versa

From the following table I want to be able to answer 3 questions with
VBA
a. From the cumulated % Column. By what date will I reach 30%
or
b. From the Running Total Column. By what date will I reach 3,000
or
c. From the Date Column. What will be the running total & % by October
1
..
Note : the Date column is in Date Format
Help appreciated
..
Date Cost1 Cost2 Total Run Ttl %
7/27/2010 12 600 612 612 10.7
7/28/2010 1 50 51 663 11.6
7/30/2010 4 200 204 867 15.2
8/25/2010 10 500 510 1,377 24.1
8/26/2010 7 350 357 1,734 30.4
8/27/2010 12 600 612 2,346 41.1
8/28/2010 13 650 663 3,009 52.7
9/30/2010 10 500 510 3,519 61.6
10/1/2010 7 350 357 3,876 67.9
10/2/2010 12 600 612 4,488 78.6
10/3/2010 24 1,200 1,224 5,712 100.0
Grand Total 112 5,600 5,712
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Find Running Total Value or % at a given Target Date or vice versa

On Oct 4, 2:32*pm, u473 wrote:
From the following table I want to be able to answer 3 questions with
VBA
a. From the cumulated % Column. By what date will I reach 30%
or
b. From the Running Total Column. By what date will I reach 3,000
or
c. From the Date Column. What will be the running total & % by October
1
.
Note : the Date column is in Date Format
Help appreciated
.
Date * * * * * * * Cost1 *Cost2 * Total Run Ttl * %
7/27/2010 * * * * * *12 600 * * * *612 * * 612 *10.7
7/28/2010 * * * * * * *1 * * * *50 * * * * * 51 * *663 *11.6
7/30/2010 * * * * * * *4 * * * *200 * * * *204 * * 867 *15.2
8/25/2010 * * * * * *10 500 * * * *510 *1,377 * 24.1
8/26/2010 * * * * * * *7 * * * *350 * * * *357 *1,734 * 30.4
8/27/2010 * * * * * *12 600 * * * *612 *2,346 * 41.1
8/28/2010 * * * * * *13 650 * * * *663 *3,009 * 52.7
9/30/2010 * * * * * *10 500 * * * *510 *3,519 * 61.6
10/1/2010 * * * * * * *7 * * * *350 * * * *357 *3,876 * 67.9
10/2/2010 * * * * * *12 600 * * * *612 *4,488 * 78.6
10/3/2010 * * * 24 * *1,200 * * 1,224 * 5,712 * * * 100.0
Grand Total *112 * * 5,600 * * *5,712


Your table doesn't come across properly with ttc so

"If desired, send your file to dguillett @gmail.com I will only look
if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results."
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Find Running Total Value or % at a given Target Date or vice versa

Ok, I should have simplified the table. here it is

Date Running Total %
7/27/2010 612 10.7
7/28/2010 663 11.6
7/30/2010 867 15.2
8/25/2010 1,377 24.1
8/26/2010 1,734 30.4
8/27/2010 2,346 41.1
8/28/2010 3,009 52.7
9/30/2010 3,519 61.6
10/1/2010 3,876 67.9
10/2/2010 4,488 78.6
10/3/2010 5,712 100.0
..
Input Boxes & expected answers for the following questions :
1 From the cumulated % Column. By what date will I reach 30% or
less ? Answer : 8/25/2010
..
2. From the Running Total Column. By what date will I reach 3,000 or
Less ? Answer : 8/27/2010
..
3. From the Date Column. What will be the running total & % by
9/01/2010 or earlier ? Answer : 3,009 and 52.7
..
Thank you for your help





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Find Running Total Value or % at a given Target Date or vice versa

On Oct 4, 4:14*pm, u473 wrote:
Ok, I should have simplified the table. here it is

Date * * * * * * * Running Total * * * * * %
7/27/2010 * * * * * * *612 * * * * * * * * 10.7
7/28/2010 * * * * * * *663 * * * * * * * * 11.6
7/30/2010 * * * * * * *867 * * * * * * * * 15.2
8/25/2010 * * * * * 1,377 * * * * * * * * *24..1
8/26/2010 * * * * * 1,734 * * * * * * * * *30..4
8/27/2010 * * * * * 2,346 * * * * * * * * *41..1
8/28/2010 * * * * * 3,009 * * * * * * * * *52..7
9/30/2010 * * * * * 3,519 * * * * * * * * *61..6
10/1/2010 * * * * * 3,876 * * * * * * * * *67..9
10/2/2010 * * * * * 4,488 * * * * * * * * *78..6
10/3/2010 * * * * * 5,712 * * * * * * * * 100.0
.
Input Boxes & expected answers for the following questions :
1 * From the cumulated % Column. By what date will I reach 30% or
less ? * * * * * * * * * Answer : 8/25/2010
.
2. * From the Running Total Column. By what date will I reach 3,000 or
Less *? * * * * * * *Answer : 8/27/2010
.
3. * From the Date Column. What will be the running total & % by
9/01/2010 or earlier ? Answer : *3,009 * and *52.7
.
Thank you for your help


A formula solution for question 1
=INDEX(A:A,MATCH(VLOOKUP(30,C2:C22,1),C:C))
or
=SMALL($A$2:$A$17,COUNTIF($C$2:$C$17,"<"&30))
for 3 , a simple vlookup will work.
For macro use a looping for/each stopping when and go back one
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
Hexadecimal to Decimal (and vice versa) Toria Excel Worksheet Functions 5 January 22nd 09 09:43 PM
Turn +ve to -ve & vice versa. Sinner Excel Programming 4 March 27th 08 01:54 PM
FirstName, LastName and vice versa Bob Excel Worksheet Functions 3 October 27th 06 06:54 PM
Delete Rows that Contain the Text "Total" and vice versa SteveC Excel Programming 7 January 25th 06 07:11 PM


All times are GMT +1. The time now is 04:13 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"