Vba change multiple formulas

ste33uka

Active Member
Joined
Jan 31, 2020
Messages
473
Office Version
  1. 365
Platform
  1. Windows
Hi i have lots of different formulas with range 2 to 77777
Is it possible using a vba to change the 77777 to 177777

example
=COUNTIFS($C$2:$C$77777,C161664) would change to
=COUNTIFS($C$2:$C$177777,C161664)

Thanks
 
Is the sheet in question, called "data"?
If so, to refer to it by name, you always need the reference to be a string - i.e. in double quotes, thus:
VBA Code:
For Each cl In Sheets("data").UsedRange.SpecialCells(xlFormulas)
... AND it needs to be case-correct.
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
yes sheet is called data, have done double quotes and case correct
Thanks
 
Upvote 0
Great.
Can you let us know if (when) it did the trick.
 
Upvote 0
Great! Thanks for letting us know.
 
Upvote 0

Forum statistics

Threads
1,215,884
Messages
6,127,562
Members
449,385
Latest member
KMGLarson

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