Hi The
In my sheet1 I have:
colA colB
r1 10 5
r2 10 4
r3 15 10
I want to do a SUMIF in sheet2 at cell(1,1). I want to add sheet1 colB
when value of Sheet1 colA is 10. I tried. I think I am having syntex
problem
Sheets(quot;Sheet2quot;).cells(1,1).formular1c1=quot;=SUMIF(Sh eets(quot;Sheet1quot;)!A1:A3,10,Sheets(quot;Sheet1quot;)!B1:B3)quot;Would appreciate if anyone can help. Thanks in advance.--
jesmin
------------------------------------------------------------------------
jesmin's Profile: www.excelforum.com/member.php...oamp;userid=29540
View this thread: www.excelforum.com/showthread...hreadid=508212
In Sheet2!
=SUMPRODUCT((Sheet1!A1:A3=10)*(Sheet1!B1:B3))
HTH
Steve--
SteveG
------------------------------------------------------------------------
SteveG's Profile: www.excelforum.com/member.php...foamp;userid=7571
View this thread: www.excelforum.com/showthread...hreadid=508212at Sheet2 - Cell A1 enter:
=SUMIF(Sheet1!$A$1:$A$3,10,Sheet1!$B$1:$B$3)
HTHquot;jesminquot; wrote:
gt;
gt; Hi The
gt; In my sheet1 I have:
gt; colA colB
gt; r1 10 5
gt; r2 10 4
gt; r3 15 10
gt;
gt; I want to do a SUMIF in sheet2 at cell(1,1). I want to add sheet1 colB
gt; when value of Sheet1 colA is 10. I tried. I think I am having syntex
gt; problem
gt; Sheets(quot;Sheet2quot;).cells(1,1).formular1c1=quot;=SUMIF(Sh eets(quot;Sheet1quot;)!A1:A3,10,Sheets(quot;Sheet1quot;)!B1:B3)quot;
gt;
gt;
gt; Would appreciate if anyone can help. Thanks in advance.
gt;
gt;
gt; --
gt; jesmin
gt; ------------------------------------------------------------------------
gt; jesmin's Profile: www.excelforum.com/member.php...oamp;userid=29540
gt; View this thread: www.excelforum.com/showthread...hreadid=508212
gt;
gt;
Hi The
In my workbook, Name of 2 worksheets are a_data amp; a_report. I am
getting correct result when I am using the following in a trial sheet:
Sheets(quot;Sheet2quot;).Cells(1,1).Formula=quot;=SUMIF(Sheet1 !A1:A3,10,Sheet1!B1:B3)quot;.
But when I am using my original workbook code with the original name as
follows, its giving run-time error.:
Sheets(quot;a_reportquot;).Cells(1,1).Formula=quot;=SUMIF(a_da ta!A1:A3,10,a_data!B1:B3)quot;--why the reference creating problem when I am chanhging just the sheet
name from Shee1 to a_data.
Thanks in advance.--
jesmin
------------------------------------------------------------------------
jesmin's Profile: www.excelforum.com/member.php...oamp;userid=29540
View this thread: www.excelforum.com/showthread...hreadid=508212
Jesmin,
Are there macros or other VB code recorded in your original that might
be causing the problem? Was the error
quot;Run-time error '9':
Subscript out of rangequot;
If you have code in the original book that was recorded using the
original sheet names (i.e. Sheet!1), you'll have to update the code
with the new sheet names.
Does that help?Steve--
SteveG
------------------------------------------------------------------------
SteveG's Profile: www.excelforum.com/member.php...foamp;userid=7571
View this thread: www.excelforum.com/showthread...hreadid=508212
- Sep 10 Mon 2007 20:39
Reference problem
close
全站熱搜
留言列表
發表留言