Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() VBA CODE: PivotRange = Range("C" & myRows & ":" & endColumn) QUESTION: Is this VBA code wrong to get the example below *i.e. * PivotRange = Range("C12343:D4") -- Ctech ------------------------------------------------------------------------ Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745 View this thread: http://www.excelforum.com/showthread...hreadid=475452 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
depends on what is in your variables
MyRows = 132343 EndColumn = "D4" would provide what you show. if endcolumn = 4 then PivotRange = Range("C" & myRows & ":D" & endColumn) -- Regards, Tom Ogilvy "Ctech" wrote in message ... VBA CODE: PivotRange = Range("C" & myRows & ":" & endColumn) QUESTION: Is this VBA code wrong to get the example below *i.e. * PivotRange = Range("C12343:D4") -- Ctech ------------------------------------------------------------------------ Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745 View this thread: http://www.excelforum.com/showthread...hreadid=475452 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ctech
Try it like this Sub test() Dim PivotRange As Range Dim myRows As Long Dim endColumn As Integer myRows = 12 endColumn = 4 Set PivotRange = Range(Cells(myRows, "C"), Cells(4, endColumn)) PivotRange.Select End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Ctech" wrote in message ... VBA CODE: PivotRange = Range("C" & myRows & ":" & endColumn) QUESTION: Is this VBA code wrong to get the example below *i.e. * PivotRange = Range("C12343:D4") -- Ctech ------------------------------------------------------------------------ Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745 View this thread: http://www.excelforum.com/showthread...hreadid=475452 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How can i make myColumn = cell.column i.e myColumn = D So far I have managed to get D5 or just (4, which I guess is D in number form) -- Ctech ------------------------------------------------------------------------ Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745 View this thread: http://www.excelforum.com/showthread...hreadid=475452 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() No replies, does this meens that there is nothing wrong with my code? -- Ctech ------------------------------------------------------------------------ Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745 View this thread: http://www.excelforum.com/showthread...hreadid=475452 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is wrong? | Excel Discussion (Misc queries) | |||
What is wrong with my UDF | Excel Discussion (Misc queries) | |||
Insert Calculated Field (wrong Qty*Price = wrong Amount) | Excel Discussion (Misc queries) | |||
Am I doing something wrong here? | Excel Programming | |||
What's Wrong with This? | Excel Programming |