A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SOS! how do I write a customized function to do multiple-value lookupin Excel 2007?



 
 
Thread Tools Display Modes
  #1  
Old December 1st, 2009, 02:37 AM posted to microsoft.public.excel.charting
LunaMoon
external usenet poster
 
Posts: 54
Default SOS! how do I write a customized function to do multiple-value lookupin Excel 2007?



I have two regions in exact same places of sheet 1 and sheet 2,
I want to find all cells in the region in sheet 1, with cell
content equal to 0,
and then add the numbers at the corresponding locations in the region
in sheet 2 up.
For example, let's say in the region in sheet 1,
there are multiple locations where the cell content = 0:
A1,
B3,
C4,
D2,
etc...
I would like to obtain sum(sheet2!A1, sheet2!B3, sheet2!C4, sheet2!
D2), etc.
How do I do that?
I want to write a user customized function for that: The regions in
sheet1 and sheet2 are fixed to be D7 to Z20.
So the first step is to find all cells in sheet1 in D7 to Z20 with
values=0, and then add up all such cells in sheet2...
How to do that? I am a green hand in using Excel/VBA...
Thanks a lot!
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.