Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Adding only part of a column of data

I have a weekly report that I send out to our team. I gather data for the
current year each month and use vlookup for most of the report. However, I
need to report some of the numbers from last year as well. I have the weeks
numbered consecutively in column A. On my report I enter the current week
number to gather the data from the vlookup. How can I get it to give me a
year to date total from the worksheet from last year? Example: I am
currently reporting week 8 numbers on my report. I can get my current YTD
number, but I need to know how to get my LY numbers for week 1-8. This will
need to change as I change the week number on my report. Does this make
sense?
--
keith jones
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Adding only part of a column of data

SUMPRODUCT might work for you. Something like:

=SUMPRODUCT(--(A1:A100=1),--(A1:A100<=8),B1:B100)

This will add all the cells in Column B with corresponding values in Column
A that are between the values 1 and 8. Adjust the cell references to meet
your needs.

HTH
Elkar


"kajones" wrote:

I have a weekly report that I send out to our team. I gather data for the
current year each month and use vlookup for most of the report. However, I
need to report some of the numbers from last year as well. I have the weeks
numbered consecutively in column A. On my report I enter the current week
number to gather the data from the vlookup. How can I get it to give me a
year to date total from the worksheet from last year? Example: I am
currently reporting week 8 numbers on my report. I can get my current YTD
number, but I need to know how to get my LY numbers for week 1-8. This will
need to change as I change the week number on my report. Does this make
sense?
--
keith jones

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 225
Default Adding only part of a column of data

Here is the idea...

Suppose you want to SUM the numbers in Col A from A1 to say A10
then enter 10 in B1 and this formula in C1
=SUM(INDIRECT("A1:A"&B1))
Now if you change B1 to 20 it will give you sum of A1:A20...

You can adapt this to your requirement... basically build a string (using
strings and references) giving you the range to SUM, pass it to INDIRECT and
then put a SUM around Indirect...

"kajones" wrote:

I have a weekly report that I send out to our team. I gather data for the
current year each month and use vlookup for most of the report. However, I
need to report some of the numbers from last year as well. I have the weeks
numbered consecutively in column A. On my report I enter the current week
number to gather the data from the vlookup. How can I get it to give me a
year to date total from the worksheet from last year? Example: I am
currently reporting week 8 numbers on my report. I can get my current YTD
number, but I need to know how to get my LY numbers for week 1-8. This will
need to change as I change the week number on my report. Does this make
sense?
--
keith jones

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Adding only part of a column of data

That did it. Thanks,
--
keith jones


"Sheeloo" wrote:

Here is the idea...

Suppose you want to SUM the numbers in Col A from A1 to say A10
then enter 10 in B1 and this formula in C1
=SUM(INDIRECT("A1:A"&B1))
Now if you change B1 to 20 it will give you sum of A1:A20...

You can adapt this to your requirement... basically build a string (using
strings and references) giving you the range to SUM, pass it to INDIRECT and
then put a SUM around Indirect...

"kajones" wrote:

I have a weekly report that I send out to our team. I gather data for the
current year each month and use vlookup for most of the report. However, I
need to report some of the numbers from last year as well. I have the weeks
numbered consecutively in column A. On my report I enter the current week
number to gather the data from the vlookup. How can I get it to give me a
year to date total from the worksheet from last year? Example: I am
currently reporting week 8 numbers on my report. I can get my current YTD
number, but I need to know how to get my LY numbers for week 1-8. This will
need to change as I change the week number on my report. Does this make
sense?
--
keith jones

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
Adding only part of a column kajones Excel Worksheet Functions 2 February 24th 09 03:28 PM
Adding data to existing data that has a unique number in column Lars Excel Discussion (Misc queries) 3 June 28th 07 11:48 AM
Adding a letter to the beginning of each part number of a column Brian Denny Excel Discussion (Misc queries) 4 November 19th 06 05:59 PM
Copying Part of a row down part of a column Not Excelling Excel Discussion (Misc queries) 3 January 6th 06 11:58 PM
Adding column data stge Excel Worksheet Functions 0 November 8th 04 02:40 PM


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