allocating specific range of data to each value in a cell.

kshitij_dch

Active Member
Joined
Apr 1, 2012
Messages
362
Office Version
  1. 365
  2. 2016
  3. 2007
Platform
  1. Windows
I am working on a sheet where i have 500 A1 to A500 Id's .

I have a range of data from F1 to F300.

Manually allocating the data to each cell in A column is time consuming .

is it possible to create a macro that will allocate range of data against each cell in column A .

For Example

A1 - 123 Allocated data F1 to F300
Allocated data F1 to F300
Allocated data F1 to F300
Allocated data F1 to F300
A2 - 345 Allocated data F1 to F300
Allocated data F1 to F300
Allocated data F1 to F300
Allocated data F1 to F300
A3 - 678 Allocated data F1 to F300
Allocated data F1 to F300
Allocated data F1 to F300
Allocated data F1 to F300
Allocated data F1 to F300
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try this:
Code:
Sub Copy_Values()
Dim c As Range
    For Each c In Range("F1:F300")
        r = r & c.Value & vbNewLine
    Next
Cells(1, 1).Value = r
End Sub
 
Upvote 0
yes its working but it is only copying in one cell . need macro to loop each cell in column A and paste data
 
Upvote 0
Well column A has 1.5 million cells
So you want F1:F300 copied into all 1.5 million cells?
 
Upvote 0
is is possible that macro will loop in column A till it finds value and if it finds a blank cell , macro come out of loop ? ?
 
Upvote 0
The only way it would find a empty cell in column A would be if there is nothing in Range("F1:F300")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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