Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All I need to get cell entries from another sheet and I don't know how man rows will be involved. I have the following code that gives me th right info but, as you can see, only if there are up to 3 row involved. Can anyone sugest how I could use an array to get my inf regardless of the number of rows involved? Thanks in advance Liz If SheetExists("Address") Then Range("C2").Select If Range("Address!G2") 0 Then ActiveCell.FormulaR1C1 = _ "=CONCATENATE(Address!RC[3]&"" ""&Address!RC[4]&" ""&Address!RC[5]&"" ""&Address!RC[6]&"" ""&Address!RC[7])" Range("C3").Select Else ActiveCell.FormulaR1C1 = _ "=CONCATENATE(Address!RC[3]&"" ""&Address!RC[5]&" ""&Address!RC[6]&"" ""&Address!RC[7])" Range("C3").Select End If If Range("Address!G3") 0 Then ActiveCell.FormulaR1C1 = _ "=CONCATENATE(Address!RC[3]&"" ""&Address!RC[4]&" ""&Address!RC[5]&"" ""&Address!RC[6]&"" ""&Address!RC[7])" Range("C4").Select Else ActiveCell.FormulaR1C1 = _ "=CONCATENATE(Address!RC[3]&"" ""&Address!RC[5]&" ""&Address!RC[6]&"" ""&Address!RC[7])" Range("C4").Select End If If Range("Address!G4") 0 Then ActiveCell.FormulaR1C1 = _ "=CONCATENATE(Address!RC[3]&"" ""&Address!RC[4]&" ""&Address!RC[5]&"" ""&Address!RC[6]&"" ""&Address!RC[7])" Range("C5").Select Else ActiveCell.FormulaR1C1 = _ "=CONCATENATE(Address!RC[3]&"" ""&Address!RC[5]&" ""&Address!RC[6]&"" ""&Address!RC[7])" Range("C5").Select End If Else Range("C2").Select ActiveCell.FormulaR1C1 = "None" End I -- Liz ----------------------------------------------------------------------- LizS's Profile: http://www.excelforum.com/member.php...fo&userid=2899 View this thread: http://www.excelforum.com/showthread.php?threadid=48719 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Annual Wages Sheet to pick up info from Time Sheet | Excel Worksheet Functions | |||
Finding Info from sheet 1 and removing only those rows from sheet | Excel Discussion (Misc queries) | |||
TAKING INFO FROM ONE SHEET AND PRODUCING A LIST IN ANOTHER SHEET | Excel Discussion (Misc queries) | |||
How do I compare info in on sheet to info in another? | Excel Discussion (Misc queries) | |||
transfering info from one sheet to another based on info being transferred | Excel Programming |