Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a large amount of bibliographic data (ca. 1000 rows and 5 or 6 columns) in csv format saved in Excel tables. After filtering out what I need I want to save the filtered data for archiving, say 20-30 rows at a time. I parse text from column 1 and then from column 5 or 6 and then I want to save it as a record. In other words in pidgin pseudocode For all the rows selected get some stuff from column 1 and then move to column 5 or 6 depending on whether a certain value is in one of them then move to next row down carry on until all rows have been processed Having looked at several books I am completely bamboozled about what to use: range, offset. Can anyone give me a start? Many thanks, Gordon Filby |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this on a COPY Of your workbook
dim myRange as range dim r as range lrow = cells(rows.count,1).end(xlup).row set myRange = cells(1,1).resize(lrow,1) for each r in myrange 'Get some stuff Value = r.value 'I'm not sure what you are doing here, so will leave it to you. 'Move to Column 5 or 6 If condition then Cells(r.row,5)value = Vlue else Cells(r.row,6).value = value end if next r "Gordon Filby" wrote: Hello, I have a large amount of bibliographic data (ca. 1000 rows and 5 or 6 columns) in csv format saved in Excel tables. After filtering out what I need I want to save the filtered data for archiving, say 20-30 rows at a time. I parse text from column 1 and then from column 5 or 6 and then I want to save it as a record. In other words in pidgin pseudocode For all the rows selected get some stuff from column 1 and then move to column 5 or 6 depending on whether a certain value is in one of them then move to next row down carry on until all rows have been processed Having looked at several books I am completely bamboozled about what to use: range, offset. Can anyone give me a start? Many thanks, Gordon Filby |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hallo,
Looks to be exactly what I need. I didn't know about resize. Easy when you know how. I'll try it on the copy and let you know. Thanks for the very prompt response. Best Regards, Gordon Filby "Barb Reinhardt" schrieb im Newsbeitrag ... Try something like this on a COPY Of your workbook dim myRange as range dim r as range lrow = cells(rows.count,1).end(xlup).row set myRange = cells(1,1).resize(lrow,1) for each r in myrange 'Get some stuff Value = r.value 'I'm not sure what you are doing here, so will leave it to you. 'Move to Column 5 or 6 If condition then Cells(r.row,5)value = Vlue else Cells(r.row,6).value = value end if next r "Gordon Filby" wrote: Hello, I have a large amount of bibliographic data (ca. 1000 rows and 5 or 6 columns) in csv format saved in Excel tables. After filtering out what I need I want to save the filtered data for archiving, say 20-30 rows at a time. I parse text from column 1 and then from column 5 or 6 and then I want to save it as a record. In other words in pidgin pseudocode For all the rows selected get some stuff from column 1 and then move to column 5 or 6 depending on whether a certain value is in one of them then move to next row down carry on until all rows have been processed Having looked at several books I am completely bamboozled about what to use: range, offset. Can anyone give me a start? Many thanks, Gordon Filby |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying Blocks of Cells | Excel Discussion (Misc queries) | |||
macro needed to copy blocks of cells across to list of cells down | Excel Programming | |||
Compare blocks of cells | Excel Programming | |||
Transposing blocks of cells | Excel Programming | |||
parsing blocks of cells for charts | Excel Programming |