This might not be the right area however i am a newbie to Excel so i
figure i'd start here. I have very limited experience with Excel so
excuse me if i don't make sense.
ANY HELP IN THE RIGHT DIRECTION WOULD BE AWESOMEI have a Column full of keywords, and i have a column full of Ad IDs...
is there a way in a *new* sheet to insert the keywords in as many times
as there are ads?
SHEET 1
Keyword 1 | 123
Keyword 2 | 456
xxxxxxxxx | 789
SHEET 2
Keyword 1 | 123
Keyword 1 | 456
Keyword 1 | 789
Keyword 2 | 123
Keyword 2 | 456
Keyword 2 | 789I found COUNTA() Which lets me count how many keywords and ads i have,
i'm just not sure what to do with those numbers now.--
TheDPQ
------------------------------------------------------------------------
TheDPQ's Profile: www.excelforum.com/member.php...oamp;userid=30915
View this thread: www.excelforum.com/showthread...hreadid=505922If I've got you right, perhaps this will help?
www.officearticles.com/excel/...soft_excel.htm
************
Hope it helps!
Anne Troy
www.OfficeArticles.com
quot;TheDPQquot; gt; wrote in
message ...
gt;
gt; This might not be the right area however i am a newbie to Excel so i
gt; figure i'd start here. I have very limited experience with Excel so
gt; excuse me if i don't make sense.
gt; ANY HELP IN THE RIGHT DIRECTION WOULD BE AWESOME
gt;
gt;
gt; I have a Column full of keywords, and i have a column full of Ad IDs...
gt; is there a way in a *new* sheet to insert the keywords in as many times
gt; as there are ads?
gt;
gt; SHEET 1
gt; Keyword 1 | 123
gt; Keyword 2 | 456
gt; xxxxxxxxx | 789
gt;
gt; SHEET 2
gt; Keyword 1 | 123
gt; Keyword 1 | 456
gt; Keyword 1 | 789
gt; Keyword 2 | 123
gt; Keyword 2 | 456
gt; Keyword 2 | 789
gt;
gt;
gt; I found COUNTA() Which lets me count how many keywords and ads i have,
gt; i'm just not sure what to do with those numbers now.
gt;
gt;
gt; --
gt; TheDPQ
gt; ------------------------------------------------------------------------
gt; TheDPQ's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30915
gt; View this thread: www.excelforum.com/showthread...hreadid=505922
gt;
You could use a macro:
Option Explicit
Sub testme()
Dim myCol1 As Range
Dim myCol2 As Range
Dim myCell1 As Range
Dim myCell2 As Range
Dim wks As Worksheet
Dim newWks As Worksheet
Dim oRow As Long
Set wks = Worksheets(quot;Sheet1quot;)
With wks
Set myCol1 = .Range(quot;a1quot;, .Cells(.Rows.Count, quot;Aquot;).End(xlUp))
Set myCol2 = .Range(quot;b1quot;, .Cells(.Rows.Count, quot;Bquot;).End(xlUp))
If myCol1.Cells.Count * myCol2.Cells.Count gt; .Rows.Count Then
MsgBox quot;Too much data!quot;
Exit Sub
End If
End With
Set newWks = Worksheets.Add
oRow = 0
For Each myCell1 In myCol1.Cells
For Each myCell2 In myCol2.Cells
oRow = oRow 1
With newWks.Cells(oRow, quot;Aquot;)
.Value = myCell1.Value
.Offset(0, 1).Value = myCell2.Value
End With
Next myCell2
Next myCell1
End Sub
If you're new to macros, you may want to read David McRitchie's intro at:
www.mvps.org/dmcritchie/excel/getstarted.htm
TheDPQ wrote:
gt;
gt; This might not be the right area however i am a newbie to Excel so i
gt; figure i'd start here. I have very limited experience with Excel so
gt; excuse me if i don't make sense.
gt; ANY HELP IN THE RIGHT DIRECTION WOULD BE AWESOME
gt;
gt; I have a Column full of keywords, and i have a column full of Ad IDs...
gt; is there a way in a *new* sheet to insert the keywords in as many times
gt; as there are ads?
gt;
gt; SHEET 1
gt; Keyword 1 | 123
gt; Keyword 2 | 456
gt; xxxxxxxxx | 789
gt;
gt; SHEET 2
gt; Keyword 1 | 123
gt; Keyword 1 | 456
gt; Keyword 1 | 789
gt; Keyword 2 | 123
gt; Keyword 2 | 456
gt; Keyword 2 | 789
gt;
gt; I found COUNTA() Which lets me count how many keywords and ads i have,
gt; i'm just not sure what to do with those numbers now.
gt;
gt; --
gt; TheDPQ
gt; ------------------------------------------------------------------------
gt; TheDPQ's Profile: www.excelforum.com/member.php...oamp;userid=30915
gt; View this thread: www.excelforum.com/showthread...hreadid=505922
--
Dave Peterson
- Jul 16 Mon 2007 20:38
Insert New Rows based on COUNTA()
close
全站熱搜
留言列表
發表留言