Help copying a formula

Brown

Board Regular
Joined
Sep 14, 2009
Messages
200
Office Version
  1. 365
I am creating a chart which consists of five small tables in the row, and I want to copy those five to create another group of five, and so on until I have 60 rows. When I copy the tables and the corresponding graphs my formulas are thrown off. Is there a way to get the numbers in the formula to adjust to the correct cell number? Or, is there a way to change the numbers other than moving to each number and retyping it and deleting the old individually?
=COUNTIF('2012'!Y17:Y23,"A")+COUNTIF('2012'!Y17:Y23,"B")+COUNTIF('2012'!Y17:Y23,"C")+COUNTIF('2012'!Y17:Y23,"D")+COUNTIF('2012'!Y17:Y23,"F")+COUNTIF('2012'!AD17:AD23,"A")+COUNTIF('2012'!AD17:AD23,"B")+COUNTIF('2012'!AD17:AD23,"C")+COUNTIF('2012'!AD17:AD23,"D")+COUNTIF('2012'!AD17:AD23,"F")
This is just one of three formulas in each chart, so there are 8 more in each row. You can understand why I am looking an easier way than type delete repeat 300 times :)
In the formual above I need to change the 17 to 19 and the 23to 25, any thoughts?

Thanks for all of the input and help!
Brown
 

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.
I don't know if this completely satifies...but you can try this
Put your cursor on the cell containing the formula
Hit CTRL+F>FindWhat>17>ReplaceWith>19

Then do the same for your other number 23.

Just be mindful that you have to be careful and not replace some other number in the field that is 17 or 23. Just watch carefully.
 
Upvote 0
ok thanks I will give it a try, at the moment I am copying the formula into a word doc and replacing the numbers but I will will have to do this 300 times :(
I just wish when I copied the tables the numbers would catch the correct cells so I did not have to do it like this ;)
 
Upvote 0
I just thought you might just need to lock your references from moving, if I understand correctly, by adding $ in front of the row and column reference. You can use F4 key after highlighting the reference in the formula.
Like this.

=COUNTIF('2012'!$Y$19:$Y$25,"A")+COUNTIF('2012'!$Y$19:$Y$25,"B")+COUNTIF('2012'!$Y$19:$Y$25,"C")+COUNTIF('2012'!$Y$19:$Y$25,"D")+COUNTIF('2012'!$Y$19:$Y$25,"F")+COUNTIF('2012'!$AD$19:$AD$25,"A")+COUNTIF('2012'!$AD$19:$AD$25,"B")+COUNTIF('2012'!$AD$19:$AD$25,"C")+COUNTIF('2012'!$AD$19:$AD$25,"D")+COUNTIF('2012'!$AD$19:$AD$25,"F")
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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