ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   autofill of sorts (https://www.excelbanter.com/excel-discussion-misc-queries/142683-autofill-sorts.html)

Vdoggoneit

autofill of sorts
 
Hello! I have a one to many relationship betweent the value in column A and
the value in column B. The value ia column A is "displayed" for each unique
occurence.
I would like to populate this value in column A for each occurence of B.

Selecting the lower right hand corner of the cell in column A and dragging
until the next value in column A works very nicely but I need to do this
literally thousands of times...any possible solutions would help.


AKphidelt

autofill of sorts
 
can you give a little more detailed example. So for all similiar values in
Column B you would like Column A to have a similiar value?

"Vdoggoneit" wrote:

Hello! I have a one to many relationship betweent the value in column A and
the value in column B. The value ia column A is "displayed" for each unique
occurence.
I would like to populate this value in column A for each occurence of B.

Selecting the lower right hand corner of the cell in column A and dragging
until the next value in column A works very nicely but I need to do this
literally thousands of times...any possible solutions would help.


Vdoggoneit

autofill of sorts
 
Sure! Thanks for the quick response...

My sheet looks like this...

horse naround
play
ofcourse
shark bait
land
sea biscuit
saw
scallop

and I want it to look like this...

horse naround
horse play
horse ofcourse
shark bait
shark land
sea biscuit
sea saw
sea scallop


"AKphidelt" wrote:

can you give a little more detailed example. So for all similiar values in
Column B you would like Column A to have a similiar value?

"Vdoggoneit" wrote:

Hello! I have a one to many relationship betweent the value in column A and
the value in column B. The value ia column A is "displayed" for each unique
occurence.
I would like to populate this value in column A for each occurence of B.

Selecting the lower right hand corner of the cell in column A and dragging
until the next value in column A works very nicely but I need to do this
literally thousands of times...any possible solutions would help.


RagDyeR

autofill of sorts
 
Say your list is in Column A.
Select from A1 down to the row number that contains your last entry in
Column B.

Then:

Hit <F5
Click "Special"
Click "Blanks"
Then <OK
Type the equal ( = ) sign
Hit the UP Arrow
Hold down <Ctrl and hit <Enter.

And you're done!
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Vdoggoneit" wrote in message
...
Sure! Thanks for the quick response...

My sheet looks like this...

horse naround
play
ofcourse
shark bait
land
sea biscuit
saw
scallop

and I want it to look like this...

horse naround
horse play
horse ofcourse
shark bait
shark land
sea biscuit
sea saw
sea scallop


"AKphidelt" wrote:

can you give a little more detailed example. So for all similiar values
in
Column B you would like Column A to have a similiar value?

"Vdoggoneit" wrote:

Hello! I have a one to many relationship betweent the value in column A
and
the value in column B. The value ia column A is "displayed" for each
unique
occurence.
I would like to populate this value in column A for each occurence of
B.

Selecting the lower right hand corner of the cell in column A and
dragging
until the next value in column A works very nicely but I need to do
this
literally thousands of times...any possible solutions would help.




AKphidelt

autofill of sorts
 
Try this... Go to Tools---- Macro---- Visual Basic Editor

Then go to Insert--- Module

Then copy and paste this code in to it

Sub Horse()

Do Until ActiveCell.Offset(1, 1).Value = ""

If ActiveCell.Value < 0 Then
ActiveCell.Copy

If ActiveCell.Offset(1, 0).Value = "" Then
ActiveCell.Offset(1, 0).PasteSpecial

Else: ActiveCell.Offset(1, 0).Activate

End If

Else: End If

Loop

End Sub

Select the first value in Column A and Go To --- Tools --- Macro ----
Macros
And select the Macro Horses and press Run

Make sure that their are NO blanks in Column B's data set. If there are I
will have to update the code. And make sure the active cell is the first cell
with a value in column A. It should work. LMK


"Vdoggoneit" wrote:

Sure! Thanks for the quick response...

My sheet looks like this...

horse naround
play
ofcourse
shark bait
land
sea biscuit
saw
scallop

and I want it to look like this...

horse naround
horse play
horse ofcourse
shark bait
shark land
sea biscuit
sea saw
sea scallop


"AKphidelt" wrote:

can you give a little more detailed example. So for all similiar values in
Column B you would like Column A to have a similiar value?

"Vdoggoneit" wrote:

Hello! I have a one to many relationship betweent the value in column A and
the value in column B. The value ia column A is "displayed" for each unique
occurence.
I would like to populate this value in column A for each occurence of B.

Selecting the lower right hand corner of the cell in column A and dragging
until the next value in column A works very nicely but I need to do this
literally thousands of times...any possible solutions would help.



All times are GMT +1. The time now is 09:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com