Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SUMIF from a Macro is giving a #Name error 2

Status
Not open for further replies.

Siggy19

Technical User
Jan 6, 2003
141
US
My spreadsheet has two sheets and I am using a SUMIF on the second sheet to sum data with specific values from the first sheet.

Both sheets have the following Columns;

Type
Value

In the Value Column of the second sheet, my code is putting
=SUMIF('Sheet1'!A:A,RC[-1],'Sheet1'!B:B)

This LOOKS correct in the spreadsheet (in cell B2, it is correctly replacing the RC[-1] with A2) however, it is displaying a #NAME error.

The only way I have found to fix it is to double click on the cell and then click on the tick without changing anything. The formula LOOKS identical, but it somehow manages to produce the correct value, instead of the error.

Any ideas ?
 
Hi,

I don't believe you can mix A1 and R1C1 notation.

A2 works for me.

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Thank you both, that worked great... <sigh>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top