Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Find in Excel VBA

If you don't have to reinvent the wheel use

Data ---- Subtotals

HTH
-Merk



11/25/03 12:37PM

I am tearing my hair our about the following:
I got a big excel table with dates in the first column and
would like to sort all the entries reversely and then
create subtotals for each date, which I am doing within a
VBA macro. However, I don't seem to be able to select all
the data. At present I do something like Range
("A1:J14000").Select because I know there are less than
14000 rows used, but how can I just select all the cells
with data in them. (by data I mean for example a non empty
date field in the first column).
I was trying to use the Find command but had no luck.
Any clues?


  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 234
Default Find in Excel VBA

I am tearing my hair our about the following:
I got a big excel table with dates in the first column and
would like to sort all the entries reversely and then
create subtotals for each date, which I am doing within a
VBA macro. However, I don't seem to be able to select all
the data. At present I do something like Range
("A1:J14000").Select because I know there are less than
14000 rows used, but how can I just select all the cells
with data in them. (by data I mean for example a non empty
date field in the first column).
I was trying to use the Find command but had no luck.
Any clues?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Find in Excel VBA

Find a colum where you are sure all rows are NOT empty
selct the first rwo on that colum
lets say colum c5
Range ("c5").select
ActiveCell.End(xlDown).Select
xLastRow= Activecell.row
Range("a5:h" & xLastRow).select
assuming h is your last colum this will select the range
of data you need.



-----Original Message-----
I am tearing my hair our about the following:
I got a big excel table with dates in the first column

and
would like to sort all the entries reversely and then
create subtotals for each date, which I am doing within a
VBA macro. However, I don't seem to be able to select all
the data. At present I do something like Range
("A1:J14000").Select because I know there are less than
14000 rows used, but how can I just select all the cells
with data in them. (by data I mean for example a non

empty
date field in the first column).
I was trying to use the Find command but had no luck.
Any clues?
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Find in Excel VBA


a slightly different approach that passes over embedded blanks and thus
doesn't ignore trailing rows

Range("A5:H" & Cells(Rows.Count,"C").End(xlUp).Row).Select


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Andres Angel" wrote in message
...
Find a colum where you are sure all rows are NOT empty
selct the first rwo on that colum
lets say colum c5
Range ("c5").select
ActiveCell.End(xlDown).Select
xLastRow= Activecell.row
Range("a5:h" & xLastRow).select
assuming h is your last colum this will select the range
of data you need.



-----Original Message-----
I am tearing my hair our about the following:
I got a big excel table with dates in the first column

and
would like to sort all the entries reversely and then
create subtotals for each date, which I am doing within a
VBA macro. However, I don't seem to be able to select all
the data. At present I do something like Range
("A1:J14000").Select because I know there are less than
14000 rows used, but how can I just select all the cells
with data in them. (by data I mean for example a non

empty
date field in the first column).
I was trying to use the Find command but had no luck.
Any clues?
.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find the FIND in Excel nancy Excel Discussion (Misc queries) 4 March 20th 08 05:28 AM
Find formatting doesn't work: "Excel cannot find data" Kasama Excel Discussion (Misc queries) 1 August 18th 06 01:40 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
How do I find a file/spreadsheet that Excel says is Already open but I can't find it? nwtrader8 Excel Discussion (Misc queries) 5 June 21st 05 02:16 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"