Copying Formula

redbarn1827

New Member
Joined
May 9, 2015
Messages
15
Hi,

I am using the following formula which i need to copy across columns, however as I copy I wish the WAR12 to increase incrementally by 1 each time, is there any way I can do this without manual edit.

{=SUM(IF(General!$P$6:$P$4585="<wbr style="color: rgb(0, 0, 128); font-family: Arial; font-size: 14.6666669845581px;">WAR12",IF(General!$AB$6:$AB$<wbr style="color: rgb(0, 0, 128); font-family: Arial; font-size: 14.6666669845581px;">4585="PART",1,0),0))}

Thanks in advance
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,450
Try this...

{=SUM(IF(General!$P$6:$P$4585= "WAR"&COLUMN(L1) ,IF(General!$AB$6:$AB$4585="PART",1,0),0))}
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,450
It works for me. What does it not do? Do you get an error or a wrong value or does it not change WAR12 to WAR13...etc? Double-check the syntax.

COLUMN(L1) returns the value 12 and it increases as you copy the formula across columns. Do not change it to COLUMN($L$1) (an absolute reference).

This will also work if you have Excel 2007 or later...
=COUNTIFS(General!$P$6:$P$4585,"WAR"&COLUMN(L1), General!$AB$6:$AB$4585, "PART")

Or this for Excel 2003 or earlier...
=SUMPRODUCT((General!$P$6:$P$4585= "WAR"&COLUMN(L1))*(General!$AB$6:$AB$4585="PART"))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,149
Messages
5,835,683
Members
430,376
Latest member
eeehhhyyy

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
Top