Microsoft KB Archive/114182

= Error Using Returned Values as Input with Fourier Analysis =

Article ID: 114182

Article Last Modified on 8/15/2003

-

APPLIES TO


 * Microsoft Excel 5.0c

-



This article was previously published under Q114182



SYMPTOMS
In Microsoft Excel, when you use the Fourier Analysis tool, provided in the Analysis ToolPak add-in, to transform data in a worksheet, and you then use the Fourier Analysis tool again and you use values previously returned by this function as the new input range values, you receive the following error message:

Fourier Analysis - All complex numbers must have the same suffix, either "i" or "j".

This behavior does not occur in Microsoft Excel version 4.0.



CAUSE
This behavior occurs because any non-imaginary number that is returned by the Fourier Analysis tool is formatted as a text value instead of number value. Because the Input Range value used in the Fourier Analysis tool must be formatted as a number, the error message appears when you use this returned value as an input value in the Fourier Analysis tool.



WORKAROUND
To avoid receiving this error message, do either of the following before using the Fourier Analysis tool using an input data range that has been returned by the Fourier Analysis tool:  Use the Paste Special dialog box to convert the values to numbers instead of text by doing the following:

 In a blank cell, type 1 . Select the cell containing the 1, and choose Copy from the Edit menu. Select the range that contains the values that have been returned by the Fourier Analysis tool. From the Edit menu, choose Paste Special. In the Paste Special dialog box, under Paste, select Values, and under Operation, choose Multiply. Choose OK.</li></ol>

-or-

</li>  Use the following macro to enter each of the numbers in the selection as a number value instead of a text value: Sub Enter_Value Dim xCell As Object For Each xCell In Selection xCell.Value = xCell.Value Next xCell End Sub </li></ul>

Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft Support professionals can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.

<div class="references_section">