Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've posted twice for help on a project I'm working on and have had no
replies, guessing that I am asking for too much. Thought I would break this down into smaller parts. I have a product listing that includes a summary line (marking, qty, item number) and multiple detail lines below. I want to change the first values in the two cells following the summay line and replace with the same information from the summary line. Ideally I only want to do this if the item number field contains a specific keyword "Panelboard". Any ideas? Thanks, Scott Here is a link to my last post if you would like to see where this is ultimately leading. If this isn't possible please let me know. http://www.microsoft.com/office/comm...640&sloc=en-us |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub AddData()
Dim rng As Range, fAddr As String Set rng = Columns(3).Find(What:="Panelboard", _ After:=Range("C1"), LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then fAddr = rng.Address Do rng.Offset(1, 0).Resize(2, 1).EntireRow.Insert rng.Offset(1, -2).Resize(2, 2).Value = rng.Offset(0, -2).Resize(1, 2).Value rng.Offset(1, 0).Value = "Black Box" rng.Offset(2, 0).Value = "Trim" Set rng = Columns(3).FindNext(rng) Loop While rng.Address < fAddr End If End Sub -- Regards, Tom Ogilvy "Scott Wagner" wrote in message ... I've posted twice for help on a project I'm working on and have had no replies, guessing that I am asking for too much. Thought I would break this down into smaller parts. I have a product listing that includes a summary line (marking, qty, item number) and multiple detail lines below. I want to change the first values in the two cells following the summay line and replace with the same information from the summary line. Ideally I only want to do this if the item number field contains a specific keyword "Panelboard". Any ideas? Thanks, Scott Here is a link to my last post if you would like to see where this is ultimately leading. If this isn't possible please let me know. http://www.microsoft.com/office/comm...640&sloc=en-us |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
You are a stud! Thank you very much! Happy New Year Scott "Tom Ogilvy" wrote: Sub AddData() Dim rng As Range, fAddr As String Set rng = Columns(3).Find(What:="Panelboard", _ After:=Range("C1"), LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then fAddr = rng.Address Do rng.Offset(1, 0).Resize(2, 1).EntireRow.Insert rng.Offset(1, -2).Resize(2, 2).Value = rng.Offset(0, -2).Resize(1, 2).Value rng.Offset(1, 0).Value = "Black Box" rng.Offset(2, 0).Value = "Trim" Set rng = Columns(3).FindNext(rng) Loop While rng.Address < fAddr End If End Sub -- Regards, Tom Ogilvy "Scott Wagner" wrote in message ... I've posted twice for help on a project I'm working on and have had no replies, guessing that I am asking for too much. Thought I would break this down into smaller parts. I have a product listing that includes a summary line (marking, qty, item number) and multiple detail lines below. I want to change the first values in the two cells following the summay line and replace with the same information from the summary line. Ideally I only want to do this if the item number field contains a specific keyword "Panelboard". Any ideas? Thanks, Scott Here is a link to my last post if you would like to see where this is ultimately leading. If this isn't possible please let me know. http://www.microsoft.com/office/comm...640&sloc=en-us |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need help with macro to copy, paste, and clear cell values | Excel Discussion (Misc queries) | |||
copy paste values macro | Excel Discussion (Misc queries) | |||
Copy values from a cell based on values of another cell | Excel Discussion (Misc queries) | |||
macro - copy values only | Excel Programming | |||
Copy & Paste values macro...almost there? | Excel Programming |