Equation Replacement

poleary2000

Active Member
Joined
Apr 1, 2002
Messages
354
I have the following equation:

=IF('Activity List'!H6>0,'Activity List'!H6,"")

It is copied down for 20k records. However, multiple rows were also manually deleted. There may have been 1k rows deleted. Thus, the equations look like this:

=IF('Activity List'!H6>0,'Activity List'!H6,"")
=IF('Activity List'!H6>0,'Activity List'!H7,"")
=IF('Activity List'!H6>0,'Activity List'!H10,"")
=IF('Activity List'!H6>0,'Activity List'!H11,"")

I need to change the equation to:

=IF(ISNUMBER('Activity List'!H6)=TRUE,'Activity List'!H6,"")

That is easy, but I can't just fill it down because of all the rows the person manually deleted. So, I'd like to replace the equation -- but can't figure out how to do it. Any thoughts?
 
Then try this:

Replace = with |=

Replace ('Act with (ISNUMBER('Act

Replace >0 with )

Replace |= with =
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
I tried the code. It replaces only the one cell with the new equation, because each subsequent cell might be H7 or h2091 or h21873.

Can you use Find and Replace to replace items on both sides of the H#? I can't figure out how to get rid of the >0 and also add the ISNUMBER prior.

Not sure if I am being clear enough here.

I know you've got your solution, but the coode was designed to run on every cell in your selection, and it would have done exactly what you asked for.
 
Upvote 0
I did try to code, but it only worked for the cell that had the reference H6. My original post did not include the correct information. It needed to be dynamic to know what the reference was and keep it. And I couldn't figure out how to edit the code in order to do that.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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