ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Filling Empty Fields (https://www.excelbanter.com/excel-discussion-misc-queries/450313-filling-empty-fields.html)

TimR1316

Filling Empty Fields
 
2 Attachment(s)
Hi all, I'm working with 2 columns of data. One column contains urls. The next column contains multiple attributes associated with a url. There is a one to many relationship between these columns (see attached). I need to fill the empty cells in the URL column with the URL above. I've done it before - I just can't remember how I did it. I seem to remember using ctrl-enter?? The examples I've attached show what I have and what I need it to look like. Any help is greatly appreciated!

GS[_2_]

Filling Empty Fields
 
Didn't look at your samples, but based on your explanation...

Befo
Select al cells to receive the same contents
Start typing
When done use 'Ctrl+Enter'

After:
Ctrl-select the cells to populate
Ctrl-select the cell containing the desired contents
F2 to enter EditMode
Ctrl+Enter to populate selected cells

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



Claus Busch

Filling Empty Fields
 
Hi Tim,

Am Thu, 4 Sep 2014 14:49:37 +0100 schrieb TimR1316:

Hi all, I'm working with 2 columns of data. One column contains urls.
The next column contains multiple attributes associated with a url.
There is a one to many relationship between these columns (see
attached). I need to fill the empty cells in the URL column with the URL
above. I've done it before - I just can't remember how I did it. I seem
to remember using ctrl-enter?? The examples I've attached show what I
have and what I need it to look like. Any help is greatly appreciated!


try:
Sub Hyp()
Dim rngC As Range
Dim LRow As Long

With ActiveSheet
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
For Each rngC In Range("A1:A" & LRow)
If Len(rngC) = 0 Then
.Hyperlinks.Add _
anchor:=rngC, _
Address:=rngC.Offset(-1, 0).Hyperlinks(1).Address, _
TextToDisplay:=rngC.Text
End If
Next
End With
End Sub

To fill hyperlinks down you have to copy them down. CTRL+Enter does not
work with hyperlinks.


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


All times are GMT +1. The time now is 05:22 PM.

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