Adding a Formula to an Existing Formula

magnethero

New Member
Joined
Apr 25, 2018
Messages
6
Hello all,

I have the following formula:

=OFFSET(INDIRECT(ADDRESS(MATCH($F$2,'Portfolio - Integration (01)'!$D:$D,0),4,,,"Portfolio - Integration (01)"),TRUE),3,-1)

It works perfectly and is part of a summary page of over 100 different tabs (bold to show that it directly references a name so many formulas with 100 different names). I'm trying to create a sum function of ever nth row using the following:

=SUMPRODUCT(D8:D1690*(MOD(ROW(D8:D1690),23)=5))

I know it should work but the problem is that for some of the sum values, in certain years, there was no value and to find and thus a #N/A shows up. This is preventing the SUMPRODUCT from running.

I want to add an encompassing =IFNA( X ,0) to the main formula but to use replace (Ctrl+H) I can only hit one side of the function at a time and it won't allow me to keep any of those value changes so I can add the other side.

How do I add in this =IFNA function without changing one grouping and copying over all my summaries to then have to manually change each tab reference?


Starting point:
=OFFSET(INDIRECT(ADDRESS(MATCH($F$2,'Portfolio - Integration (01)'!$D:$D,0),4,,,"Portfolio - Integration (01)"),TRUE),3,-1)

Goal:
=IFNA(OFFSET(INDIRECT(ADDRESS(MATCH($F$2,'Portfolio - Integration (01)'!$D:$D,0),4,,,"Portfolio - Integration (01)"),TRUE),3,-1),0)
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Why can't you search and replace the entire formula? (CTRL + H)
There are no relative cell references in your formula or what am I missing?
 
Upvote 0
My problem was that if I used CTRL + H I could do it one block at a time because each of the bolded sections was an individual tab name. I would have had to do over 100 different replace in order to add in the IFNA function. This morning I did figure out a solution to being able to create the brackets on either end.

Dumb the cell by Ctrl + H and remove the = in all cells. Then I just added the two sides in two more replaces [in this case replacing OFFSET with IFNA(OFFSET and then the closing ) with ),0) ] before one final replace for IFNA( to =IFNA( making all the functions live again.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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