Copy non-blank cells

cranmax

New Member
Joined
Jul 25, 2016
Messages
16
Hello,

I'm new to this page so hello to all.
I've got two questions and what I want to achieve is Column B:

1. How could I... (I'll explain it the most graphic I can)

Column
A B
Rows: 1 3200
2 3200 world
3
4
5 world

Note: all the cells contain a formula, so the output of A1, A3, A5 is ""

2. How could I transform to Excel date?

Column
A B
Rows: 1 19820421 21/04/1982
2 19820422 22/04/1982
3 19820425 25/04/1982
4 19820426 26/04/1982

Thanks.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Upvote 0
Hi, one of the problems with images is that they do not provide a permanent record for the forum - if you are not able to paste example data then a written explanation directly in the thread is a better way to describe your set-up.

Having said that, you could try this:


Excel 2013
ABCDE
1HeaderResultHelper3
222
344
415
5-8
6
715
Sheet1
Cell Formulas
RangeFormula
E1=COUNTIF($A$2:$A$7,">0")
B2{=IF(ROWS($B$2:B2)>$E$1,"",INDEX($A$2:$A$7,SMALL(IF(ISNUMBER($A$2:$A$7),IF($A$2:$A$7>0,ROW($A$2:$A$7)-ROW($A$2)+1)),ROWS($B$2:B2))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi, one of the problems with images is that they do not provide a permanent record for the forum - if you are not able to paste example data then a written explanation directly in the thread is a better way to describe your set-up.

Having said that, you could try this:


Excel 2013
ABCDE
1HeaderResultHelper3
222
344
415
5-8
6
715
Sheet1
Cell Formulas
RangeFormula
E1=COUNTIF($A$2:$A$7,">0")
B2{=IF(ROWS($B$2:B2)>$E$1,"",INDEX($A$2:$A$7,SMALL(IF(ISNUMBER($A$2:$A$7),IF($A$2:$A$7>0,ROW($A$2:$A$7)-ROW($A$2)+1)),ROWS($B$2:B2))))}
Press CTRL+SHIFT+ENTER to enter array formulas.

Thanks for for reply but I can't see completely the array formulas.

.
 
Upvote 0
Thanks for for reply but I can't see completely the array formulas.

Hi, is this any better?

Rich (BB code):
=IF(ROWS($B$2:B2)>$E$1,"",INDEX($A$2:$A$7,SMALL(IF(ISNUMBER($A$2:$A$7),IF($A$2:$A$7>0,ROW($A$2:$A$7)-ROW($A$2)+1)),ROWS($B$2:B2))))
 
Upvote 0
Hi, is this any better?

Rich (BB code):
=IF(ROWS($B$2:B2)>$E$1,"",INDEX($A$2:$A$7,SMALL(IF(ISNUMBER($A$2:$A$7),IF($A$2:$A$7>0,ROW($A$2:$A$7)-ROW($A$2)+1)),ROWS($B$2:B2))))

Yes, I can see it and it works,now I have to adapt it to my spreadsheet, thanks for your effort.

Another question: following with your array formula, if the spreadsheet have 100 Rows and not 7, is possible to put it (100) on a cell (for example F1) and modify the formula from $A$7 to $A$(=F1)?
 
Upvote 0
if the spreadsheet have 100 Rows and not 7

Hi, to make the ranges dynamic take a look at using tables and structured references or dynamic named ranges. Or alternatively adjust the 7 to a sensible maximum.
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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