Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Complex Function: Match names on Two Sheets

I am trying to find one name and sum all values in a column; sum would go
into Column G. For instance, I have the employee number in Column A in a
sheet named €˜Filtered List and I want to sum all values in Column E of the
same sheet in the rows where that employee number shows up. The problem is
that the names are not in adjacent rows. I know Sumproduct can overcome this
limitation, but also, I wont know the Employee ID numbers in advance,
because this list is built on the fly, with a macro, so I was hoping to find
a function that I can pop into another simple macro that I have.

Something like this would work:
=SUMPRODUCT((A2:A13=115354)*(E2:E13))

But again, I wont know the Employee ID number in advance, so I cant
necessarily use €˜115354 in my Sumporduct.

Any thoughts?

Thanks,
Ryan---



--
RyGuy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Complex Function: Match names on Two Sheets

I don;'t know why I put 'two names on two sheets'. Maybe I wasn't paying
attention (not unusual for me). As stated above, I want to Find employee ID
numbers in Column A in a sheet named €˜Filtered List and I want to sum all
values in Column E of the same sheet; sum all values that correspond to a
certain ID number.


--
RyGuy


"ryguy7272" wrote:

I am trying to find one name and sum all values in a column; sum would go
into Column G. For instance, I have the employee number in Column A in a
sheet named €˜Filtered List and I want to sum all values in Column E of the
same sheet in the rows where that employee number shows up. The problem is
that the names are not in adjacent rows. I know Sumproduct can overcome this
limitation, but also, I wont know the Employee ID numbers in advance,
because this list is built on the fly, with a macro, so I was hoping to find
a function that I can pop into another simple macro that I have.

Something like this would work:
=SUMPRODUCT((A2:A13=115354)*(E2:E13))

But again, I wont know the Employee ID number in advance, so I cant
necessarily use €˜115354 in my Sumporduct.

Any thoughts?

Thanks,
Ryan---



--
RyGuy

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Complex Function: Match names on Two Sheets

it turned out to be just this:
=SUMPRODUCT(($A$2:$A$13=A2)*($E$2:$E$13))


In VBA:
Range("F2").Select
ActiveCell.FormulaR1C1 = "=SUMPRODUCT((R2C1:R300C1=RC[-5])*(R2C5:R300C5))"
Range("F2").Select


lastrow = Worksheets("Filtered List").Cells(Rows.Count, "E").End(xlUp).Row
Range("F2").AutoFill Range("F2:F" & lastrow)

Thought it was much more challenging when I first posted.

Anyway, glad it is resolved!!
--
RyGuy


"ryguy7272" wrote:

I don;'t know why I put 'two names on two sheets'. Maybe I wasn't paying
attention (not unusual for me). As stated above, I want to Find employee ID
numbers in Column A in a sheet named €˜Filtered List and I want to sum all
values in Column E of the same sheet; sum all values that correspond to a
certain ID number.


--
RyGuy


"ryguy7272" wrote:

I am trying to find one name and sum all values in a column; sum would go
into Column G. For instance, I have the employee number in Column A in a
sheet named €˜Filtered List and I want to sum all values in Column E of the
same sheet in the rows where that employee number shows up. The problem is
that the names are not in adjacent rows. I know Sumproduct can overcome this
limitation, but also, I wont know the Employee ID numbers in advance,
because this list is built on the fly, with a macro, so I was hoping to find
a function that I can pop into another simple macro that I have.

Something like this would work:
=SUMPRODUCT((A2:A13=115354)*(E2:E13))

But again, I wont know the Employee ID number in advance, so I cant
necessarily use €˜115354 in my Sumporduct.

Any thoughts?

Thanks,
Ryan---



--
RyGuy

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
Match Names in columns then copy associated info from 2 sheets Seantastic Excel Worksheet Functions 4 October 29th 08 08:29 PM
Match with Complex Lookup_array karlsven Excel Worksheet Functions 2 December 20th 07 08:18 AM
Complex Summing probably using Match at some point... George Excel Worksheet Functions 2 October 10th 07 05:39 PM
Complex Index Match Help (or at least complex to me) Jennifer Reitman Excel Discussion (Misc queries) 3 August 10th 06 08:51 PM
Complex LookUp / Match Problem ?? carl Excel Worksheet Functions 2 May 2nd 05 08:53 PM


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