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: 53
Default Lookup and Sum

I am trying to look up and sum multiple values using 2 different criteria. I
then want to put that sum in a cell on another sheet. I am currently using
this formula, which works fine:
=SUM(IF((Received!$B$8:$B$140=G$2)*(Received!$C$8: $C$140=Project),Received!$E$8:$E$140))
(entered with ctrl+shft+entr)

The problem is that I have 2100 similar formulas on one sheet. I'd like to
write VBA code to loop through this so the average user can't mess up the
formula by simply clicking on a cell! If someone could help me determine how
to do this for one column I'm sure I could apply as needed through the rest
of the sheet. I'm not a VBA beginner but not an expert either.

The above formula is currently in cell G5 of my summary sheet. It extends
down to G173, but in every row the If True value changes columns. For
instance in G6 the formula looks like this:
=SUM(IF((Received!$B$8:$B$140=G$2)*(Received!$C$8: $C$140=Project),Received!$F$8:$F$140))

Would I use a loop or the Do function to run this down to G173 in my summary
sheet and out to column FE in the formula? I just need a little help getting
started! Thanks.
 
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
lookup help. lookup result based on data in 2 columns lcc Excel Worksheet Functions 3 April 6th 10 01:20 PM
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU JCC Excel Discussion (Misc queries) 5 June 26th 09 09:15 PM
Get Cell Address From Lookup (Alternative to Lookup) ryguy7272 Excel Worksheet Functions 12 September 28th 07 10:36 PM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


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