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
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,378
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,378
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"))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,499
Messages
5,596,517
Members
414,074
Latest member
Matthew Kakde

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