# Copying Formula

#### redbarn1827

##### New Member
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))}

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try this...

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

Thank you, but I couldn't get this to work.

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"))

Replies
0
Views
453
Replies
7
Views
450
Replies
4
Views
177
Replies
2
Views
693
Replies
1
Views
291

1,203,205
Messages
6,054,136
Members
444,703
Latest member
pinkyar23

### 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.

### Which adblocker are you using?

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

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