Column() Function Leading To #VALUE! Error

3LeggedDog

Board Regular
Joined
Feb 11, 2006
Messages
149
Unfortunately, I'm at my work computer at the moment, and am not able to copy the sheet over, but I will try to describe the issue here.

At work, I use Excel 2003. I have a formula that essentially mimics the 2007 SumIfs function, while calling a range from a different sheet. In order to make the sheet easily scaleable, I tried to use the column() function, which I've used many times without incident. When I just put in the specific column that I want, the formula works perfectly, but when I replace the column number with the column() function, I get a #VALUE! error.

I ran the Formula Evaluator to determine where the issue was coming up - for some reason, the column() call is evaluating to a {3} (or 4, 5, 6, etc depending on the column), rather than a regular 3. I've never seen a formula evaluate out this way, with braces, and I'm not sure what could be causing that. Here's the entire formula:

=SUMPRODUCT(INDIRECT(CONCATENATE("Sheet1!",ADDRESS(5,MATCH(INDIRECT(ADDRESS(1,COLUMN())),Sheet1!$A$4:$CC$4,0)),":",ADDRESS(5000,MATCH(INDIRECT(ADDRESS(1,COLUMN())),Sheet1!$A$4:$CC$4,0)))),INDIRECT(CONCATENATE("Sheet1!",ADDRESS(5,MATCH($A3,Sheet1!$A$4:$CC$4,0)),":",ADDRESS(5000,MATCH($A3,Sheet1!$A$4:$CC$4,0)))),INDIRECT(CONCATENATE("Sheet1!",ADDRESS(5,MATCH(INDIRECT(ADDRESS(2,COLUMN())),Sheet1!$A$4:$CC$4,0)),":",ADDRESS(5000,MATCH(INDIRECT(ADDRESS(2,COLUMN())),Sheet1!$A$4:$CC$4,0)))))

The relevant part, though, is here:
=SUMPRODUCT(INDIRECT(CONCATENATE("Sheet1!",ADDRESS(5,MATCH(INDIRECT(ADDRESS(1,COLUMN())),Sheet1!$A$4:$CC$4,0)),":",ADDRESS(5000,MATCH(INDIRECT(ADDRESS(1,COLUMN())),Sheet1!$A$4:$CC$4,0))))

Again, I wish that I could post this using Colo's HTML maker, but I don't have it here at work, and adding things onto the computers at work is probably frowned upon.

Any help would be appreciated - I'm just really puzzled by why the column() call would evaluate in a way that I've never seen before.

Thanks,
3LD
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Aladin,
I misspoke (mistyped) earlier when I implied that this particular formula simulates SumIfs - the columns that I'm taking the dot product of with SumProduct have a binary value in each cell. Essentially I'm trying to get the dotproduct of three columns, and two of those columns are just binary.

I will try to post some informative stuff from the sheet itself tomorrow when I'm back at work.

Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top