Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tig tig is offline
external usenet poster
 
Posts: 3
Default Find First Row where "value" = ""

I need to find the first row in column X where the value = "". By
value I mean the value of the formula. I have a formula in 1 through
65536 as I don't know how many rows the user is going to need from one
day to the next.

Any ideas??


TIA

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Find First Row where "value" = ""

First off, why don't you just set up your range of existing data as a list?
Then when you need to add a new entry, you just add an entry to the list and
any formulas above it (like the one in column X) are automatically applied
to the new entry. Populating all 65,536 rows is not efficient.

From an Oct 2004 posting by Michael Bauer:
This sample finds the first cell in column 24 from buttom up that is *not*
empty. The next cell then is empty of course.

dim rn as excel.range

set rn=Worksheets.Columns(24).Find("*", , xlValues, xlWhole, xlByRows,
xlPrevious)
if not rn is nothing then
set rn=rn.offset(1,0)
else
' the last row (65536) isnīt empty
endif

"tig" wrote in message
ups.com...
I need to find the first row in column X where the value = "". By
value I mean the value of the formula. I have a formula in 1 through
65536 as I don't know how many rows the user is going to need from one
day to the next.

Any ideas??


TIA



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Find First Row where "value" = ""

Dim X as long
for X=1 to 65536
If cells(X,"x")="" then
msgbox x
exit for
end If
Next X

tig wrote:
I need to find the first row in column X where the value = "". By
value I mean the value of the formula. I have a formula in 1 through
65536 as I don't know how many rows the user is going to need from one
day to the next.

Any ideas??


TIA


  #4   Report Post  
Posted to microsoft.public.excel.programming
tig tig is offline
external usenet poster
 
Posts: 3
Default Find First Row where "value" = ""

KC Rippstein wrote:
First off, why don't you just set up your range of existing data as a list?
Then when you need to add a new entry, you just add an entry to the list and
any formulas above it (like the one in column X) are automatically applied
to the new entry. Populating all 65,536 rows is not efficient.

From an Oct 2004 posting by Michael Bauer:
This sample finds the first cell in column 24 from buttom up that is *not*
empty. The next cell then is empty of course.

dim rn as excel.range

set rn=Worksheets.Columns(24).Find("*", , xlValues, xlWhole, xlByRows,
xlPrevious)
if not rn is nothing then
set rn=rn.offset(1,0)
else
' the last row (65536) isnīt empty
endif

"tig" wrote in message
ups.com...
I need to find the first row in column X where the value = "". By
value I mean the value of the formula. I have a formula in 1 through
65536 as I don't know how many rows the user is going to need from one
day to the next.

Any ideas??


TIA

Thanks for the post KC. I think that will do it. I'm interested in
learning a little more about your range as a list idea. The column
that I'm actually going after is column "D". I just used X as a
variable.

My formula in D2:D65536 is IF(C# = "", "", "This, that and whatever")

One day the user may import 500 records another day they might have
5000. In your idea, are you saying don't populate the "D" cell with
the formula if the respective "C" cell is empty. I'm not sure I
understood your meaning, but I'm very interested in making this process
more efficient.

Could you give me some additional detail on your idea and/or some code
to start with?

Thanks again for the help.

  #5   Report Post  
Posted to microsoft.public.excel.programming
tig tig is offline
external usenet poster
 
Posts: 3
Default Find First Row where "value" = ""


Zone wrote:
Dim X as long
for X=1 to 65536
If cells(X,"x")="" then
msgbox x
exit for
end If
Next X

tig wrote:
I need to find the first row in column X where the value = "". By
value I mean the value of the formula. I have a formula in 1 through
65536 as I don't know how many rows the user is going to need from one
day to the next.

Any ideas??


TIA


Thanks Zone. That works too.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Find First Row where "value" = ""

I am thinking very basic here. When you select your data in your sheet, go
to Data - List - Create List.
Then when someone has to import records, they can copy all the data values
to be imported, go to the blue asterisk and hit enter.

This assumes, of course, that your data is columns A:C and columns
D:whatever are your formulas. Data needs to be contiguous, then formulas to
the right of it, in order to make copying and pasting a one-touch manual
operation. When your rows of data are pasted, the formulas in D, E, etc.
are automatically dragged down for the new recordsets.


"tig" wrote in message
s.com...
KC Rippstein wrote:
First off, why don't you just set up your range of existing data as a
list?
Then when you need to add a new entry, you just add an entry to the list
and
any formulas above it (like the one in column X) are automatically applied
to the new entry. Populating all 65,536 rows is not efficient.

From an Oct 2004 posting by Michael Bauer:
This sample finds the first cell in column 24 from buttom up that is *not*
empty. The next cell then is empty of course.

dim rn as excel.range

set rn=Worksheets.Columns(24).Find("*", , xlValues, xlWhole, xlByRows,
xlPrevious)
if not rn is nothing then
set rn=rn.offset(1,0)
else
' the last row (65536) isnīt empty
endif

"tig" wrote in message
ups.com...
I need to find the first row in column X where the value = "". By
value I mean the value of the formula. I have a formula in 1 through
65536 as I don't know how many rows the user is going to need from one
day to the next.

Any ideas??


TIA

Thanks for the post KC. I think that will do it. I'm interested in
learning a little more about your range as a list idea. The column
that I'm actually going after is column "D". I just used X as a
variable.

My formula in D2:D65536 is IF(C# = "", "", "This, that and whatever")

One day the user may import 500 records another day they might have
5000. In your idea, are you saying don't populate the "D" cell with
the formula if the respective "C" cell is empty. I'm not sure I
understood your meaning, but I'm very interested in making this process
more efficient.

Could you give me some additional detail on your idea and/or some code
to start with?

Thanks again for the help.


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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... Maria J-son[_2_] Excel Programming 2 March 5th 06 12:20 PM


All times are GMT +1. The time now is 10:21 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"