Replace cell reference

Rock5150

Board Regular
Joined
Nov 16, 2012
Messages
93
Office Version
  1. 365
Platform
  1. Windows
Hello

I have the following formula in a cell. If I wanted to change say DM89 to DM56 for example as there would be 56 rows, how do I do a simple replace or is it even possible. That way I don't go in the formula and move the cursor over and manually delete 89 and put 56. Or even one step further, if there were only 56 rows of data, is there a way to tweak the below formula to only select the range up to the last known cell with data assuming no spaces after the last enter and a straggler say 4 or 5 cells below?

=IF(ROWS($DE$2:$DE2)>COMBIN(COUNTA($DM$2:$DM$89),2),"",INDEX(DM$2:DM$89,LOOKUP(ROWS(DM$2:DM2)-1,COMBIN(COUNTA($DM$2:$DM$89),2)-COMBIN(COUNTA($DM$2:$DM$89)+1-ROW(INDIRECT("1:"&COUNTA($DM$2:$DM$89)-1)),2),ROW(INDIRECT("1:"&COUNTA($DM$2:$DM$89))))))
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hello, @Rock5150!
Answer to the first question only:
1. select the cell with the formula,
2. press Ctrl+H (call the Find and Replace dialog box),
3. in the "Find what:" field enter $DM$89 and in the "Replace with:" enter $DM$56,
4. press Enter.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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