If(iserror(????)

wisemank

Board Regular
Joined
Jun 21, 2010
Messages
129
:eek:Scenario:

I have a row of cells that make up a time line (E44:BA44) Starting at E44 moving left to right, the days (formated as dates) on the timeline are a sequence using formulas pointing to the startdate with the appropriate incrementation.

:confused: Question:

If I have a blank begin date all the corrisponding sequence dates are in error. I can manually add an IF(iserror(),"",()) command to the formula, but my question is this.

Can I create a macro for the toolbar that could properly insert the IF(ISERROR...statement and replace the existing formula while maintaing the original formula existing in the cells?

See Example below:

Actual Equation for F44: (=E44+2)
Results:
E44 is : 8/01/2010
F44 results: 8/03/2010

If E44 is blank then the rest of my timeline string is in error. The timeline equations can be different increments depending on the requested overall length of time required. Other than manually attacking this is there and easy way to replace the existing formulas to include the error statement?:)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try:

Code:
Public Sub addiserror()
Dim i As Long
For i = 5 To 53
    Cells(44, i).Formula = "=IF(ISERROR(" & Cells(44, i).Formula & "),""""," & Cells(44, 1).Formula & ")"
Next i
End Sub

I haven't tested it yet, so I'm concerned that it may add in an extra "=" every time it uses Cells(44,i).Formula. Be sure to back up your current formulas before you use it!
 
Upvote 0
Thanks. I'll Try it and see what goes....

Would be nice for MS to add buttons to insert these types of commands after the fact...
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,488
Members
448,967
Latest member
visheshkotha

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