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 Summing a range. Please Help!

I wonder if someone could give me some advice please? This sounds like
a simple task but I'm having trouble approaching it. I'm not new to
programming, and I'm not new to Excel, but I am new to VBA, which
probably explains my indecision. I'll simplify the task:

I have a workbook with two worksheets in it. They contain a similar
list of entries, identified uniquely by a contract_id. In other words,
each row in Worksheet1 has a corresponding row in Worksheet2, linked by
a common contract_id. In Worksheet1, every working day over the next
year or so is represented by a column, where I can enter a figure
showing the number of 'man-days' worked on the contract entered in that
row.

Worksheet2 is something similar, except that here, instead of
individual days, I just have the year broken down into quarters: Q1,
Q2, Q3 and Q4. I want to have Excel update the Quarter cells by
counting the sum of the days in the corresponding contract row in the
other sheet.

If the contracts always remained in the same order in both sheets, I
could use a simple formula in Worksheet2 that went and found the
relevant Quarter value in Worksheet1. But the two ranges are often
sorted by different things: contract_id, customer name, value,
percentage, and so on. So they will sometimes not be in the same order
on the two worksheets.

So I want to be able to enter (manually) figures in Worksheet1
representing man-days and see them totalled into Quarters when I open
Worksheet2, even if the contracts are in a different order.

In programming terms, I want to point to a cell value (ie the
contract_id), tell Excel to go and find a match in a range on another
sheet, and then sum some cells in the same row of that second sheet
(presumably using an offset?).

The task seems pretty simple to be honest, but I'm just beating my head
against a wall here trying to make it work. Does anyone have some
advice please about the kind of approach I should take?

Thank you in advance

Will

 
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
Summing a range of cells based on criteria in another range Jack Excel Worksheet Functions 2 November 5th 09 01:46 AM
Summing a Range With N/A's SamuelT Excel Discussion (Misc queries) 3 June 19th 06 04:51 PM
Summing between Range cb3291u Excel Discussion (Misc queries) 2 May 31st 06 04:46 PM
Summing a range that changes Jeff Excel Discussion (Misc queries) 6 January 9th 06 10:57 PM
Summing a Range Bill Li Excel Programming 1 August 19th 03 05:40 AM


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