• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Replace #N/A with next Valid Data

Amit Gandhi

New Member
Hi Experts

I have excel data in column B. In some cells there is data #N/A

--> I want to Replace #N/A , with data in next cell.
--> If #N/A is in more than 1 cells (continuous) , then Replace them with next valid data.
--> If there is no Valid data in any next cell, then Replace them with Blank.

I have attached excel file which shows sample data and result required for better understanding.

Please help me here.

Regards

Amit
 

Attachments

  • Sample File.xlsx
    11.1 KB · Views: 6
Hi Amit,

Please check this {array formula}

=IFERROR(INDEX($B$4:$B$35,SMALL(IF(ISNUMBER($B$4:$B$35),ROW($B$4:$B$35)-MIN(ROW($B$4:$B$35)-1)),IF(ISERROR(B4),COUNTIF($B$4:$B4,">0")+1,COUNTIF($B$4:$B4,">0")))),"")

{array formula needs to be entered with Ctrl+Shift+Enter}

Regards,
 
Hi Amit,

Please check this {array formula}

=IFERROR(INDEX($B$4:$B$35,SMALL(IF(ISNUMBER($B$4:$B$35),ROW($B$4:$B$35)-MIN(ROW($B$4:$B$35)-1)),IF(ISERROR(B4),COUNTIF($B$4:$B4,">0")+1,COUNTIF($B$4:$B4,">0")))),"")

{array formula needs to be entered with Ctrl+Shift+Enter}

Regards,
Thanks Khalid, its working.
 
Back
Top