Copy/paste without #N/A's using only excel formulas

espinozr

New Member
Joined
Jun 4, 2019
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hello,


I have a table of data with numbers and some NA() values. I need to find a way to copy the rows with no NA() into another columns. Something like this:

AB
101/01/0110
201/02/13#NA
35/06/143
401/01/16#NA
505/09/194
605/3/205

<tbody>
</tbody>


I should copy this data into columns D/E ignoring the rows with NA:


DE
101/01/0110
25/06/143
305/09/194
405/3/205

<tbody>
</tbody>

I know I can filter, deselect NA and copy and paste the values, the problem is that I need to do this hundreds of times. Is there a way to do this using only excel formulas, without using a filter, or VB code?


Thanks,
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Try:

=IFERROR(INDEX(A$1:A$6,SMALL(IF(NOT(ISERROR($B$1:$B$6)),ROW($B$1:$B$6)),ROWS($A$1:A1))),"")

Enter CTRL-SHIFT-ENTER.
 
Upvote 0
It's very strange. Your formula does work when I use a simple example like the one I showed above. However, when I tried to apply it to my real table, is not working. The formula ignores all the rows until the first "#N/A" appears. It does work for the following rows.

I then copied the data from my table into a new spreadsheet, and the formula does work... how is this possible? Is the same data, copied and pasted into another sheet, and now the formula works. Could it be a formatting issue in the data of the original table?
 
Upvote 0
59Zs4cp
This is what is happening, I hide all the unnecessary columns. As you can see the filter works perfectly after "18/06/2010", but is filtering all the rows between 9 to 15.
 
Upvote 0
I feel stupid, but I cannot find the edit button... Anyway, here is a link to a screenshot.

59Zs4cp
https://ibb.co/59Zs4cp
 
Upvote 0
Ok if you arent starting from row 1 you need to add a little eg:

=IFERROR(INDEX(A$1:A$6,SMALL(IF(ISNUMBER($B$1:$B$6),ROW($B$1:$B$6)-ROW($B$1)+1),ROWS($A$1:A1))),"")
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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