Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using the following to set a dynamic range in an Excel 2003 workbook that
I use to determine records to be exported to a CSV file. My formula is setting the dynamic range with one extra (blank) row that results in my CSV file having a row of commas at the end of the file. That's causing all kinds of problems. Any help will be greatly appreciated. Dynamic range formula =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A),13) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try to decrease No of rows:
=OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A)-1,13) Regards, Stefi €˛Ken Warthen€¯ ezt Ć*rta: I'm using the following to set a dynamic range in an Excel 2003 workbook that I use to determine records to be exported to a CSV file. My formula is setting the dynamic range with one extra (blank) row that results in my CSV file having a row of commas at the end of the file. That's causing all kinds of problems. Any help will be greatly appreciated. Dynamic range formula =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A),13) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Because you are starting at a2 and counting all of a, simply subtract one
=OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A),13 =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A)-1,13 Don Guillett Microsoft MVP Excel SalesAid Software "Ken Warthen" wrote in message ... I'm using the following to set a dynamic range in an Excel 2003 workbook that I use to determine records to be exported to a CSV file. My formula is setting the dynamic range with one extra (blank) row that results in my CSV file having a row of commas at the end of the file. That's causing all kinds of problems. Any help will be greatly appreciated. Dynamic range formula =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A),13) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're including A1 in your cound, but you're offsetting from A2.
You could use Stefi's adjusted formula if you know that A1 always has something in it: =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A)-1,13) Or you could adjust the range to avoid A1: =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A2:$A65536)-1,13) or subtract the number of cells (just 1 in your example) that have something in them: =OFFSET(csv!$A$2,0,0,COUNTA(csv!$A:$A)-COUNTA(csv!$A$1),13) This might be more useful if you had 10 cells that may (or may not) have stuff in them: =OFFSET(csv!$A$11,0,0,COUNTA(csv!$A:$A)-COUNTA(csv!$A$1:$a$10),13) Ken Warthen wrote: I'm using the following to set a dynamic range in an Excel 2003 workbook that I use to determine records to be exported to a CSV file. My formula is setting the dynamic range with one extra (blank) row that results in my CSV file having a row of commas at the end of the file. That's causing all kinds of problems. Any help will be greatly appreciated. Dynamic range formula =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A),13) -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks (Don and Stefi) for the help.
"Don Guillett" wrote: Because you are starting at a2 and counting all of a, simply subtract one =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A),13 =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A)-1,13 Don Guillett Microsoft MVP Excel SalesAid Software "Ken Warthen" wrote in message ... I'm using the following to set a dynamic range in an Excel 2003 workbook that I use to determine records to be exported to a CSV file. My formula is setting the dynamic range with one extra (blank) row that results in my CSV file having a row of commas at the end of the file. That's causing all kinds of problems. Any help will be greatly appreciated. Dynamic range formula =OFFSET(CSV!$A$2,0,0,COUNTA(CSV!$A:$A),13) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
dynamic range based on criteria, within a dynamic range, passed to a function | Excel Programming | |||
creating a dynamic range based on criteria, within a dynamic range, and passing it to a function | Excel Programming | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
Dynamic Ranges: Speed Issue | Excel Worksheet Functions | |||
select dynamic range with dynamic start point | Excel Programming |