Find values on an a range of columns and rows and copy them to a column

vladi305

Board Regular
Joined
Jan 12, 2023
Messages
88
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have groups of data on a range of columns and row. Some of those are blank. The solution will be to copy into a column the cells that contain a value.
Notice the picture attached. The groups are the one left wIth a background filled and the column is the one on the right
 

Attachments

  • Screenshot_20230215-140601_Excel.jpg
    Screenshot_20230215-140601_Excel.jpg
    152.1 KB · Views: 11
it works fine in my mobile office, the formula should be:
Rich (BB code):
=TOCOL(D3:M7/(LEN(D3:M7)>0),3)
1676520704880.png
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
update my formula:
VBA Code:
=TOCOL(D3:M7/(LEN(D3:M7)>0),3)

if source data contains number and text, please use Fluff's solution.
 
Upvote 0
If you type =to into a cell does the autocomplete options include TOCOL?
 
Upvote 0
The containing formulas are: =IF(Freq!K17<10,Freq!K3,"")
The data format is General
 
Upvote 0
If you have the tocol function, then I don't understand why it's not working.
The formula I posted should work work with text & numbers, whilst the formula by shaowu459 should work with numbers.
 
Upvote 0
I tried this formula in another new worksheet and it works fine
both
=TOCOL(A1:I2,3) without formulas and it remove blanks
=TOCOL(IF(A1:J2="",x,A1:J2),3) Your method works fine as well with formulas

This worksheet i'm working on is saved as a vba but I dont think this should be an issue
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
I've no idea, can you post the data & formulae using the XL2BB add-in?
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,676
Members
449,463
Latest member
Jojomen56

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