A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting range in a column where data ends



 
 
Thread Tools Display Modes
  #1  
Old July 28th, 2004, 05:25 PM
saziz
external usenet poster
 
Posts: n/a
Default Setting range in a column where data ends

Hi Guys,
I have two problems I trying to solve.

1) Column A & B has data (may be 500 rows) a formula is written in
Column C and I like to fill it down until column A & B has Data that
could be 500 to 1000 rows.

2) Then I need to delet cells in column a,b & C if certain cells are
empty.
Thanks for your help
Saziz


---
Message posted from http://www.ExcelForum.com/

  #2  
Old July 28th, 2004, 06:08 PM
Bernie Deitrick
external usenet poster
 
Posts: n/a
Default Setting range in a column where data ends

Saziz,

The solution for the second part depends on what you mean by empty, and the
solution of the first part may be different if your "empty" cells are truly
empty, or if they appear empty from a formula returning "".

Try selecting your formula cell (after you have entered the formula) and
double clicking the fill handle . That should copy down to match column B's
length.

Post back with what you mean by empty...

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Hi Guys,
I have two problems I trying to solve.

1) Column A & B has data (may be 500 rows) a formula is written in
Column C and I like to fill it down until column A & B has Data that
could be 500 to 1000 rows.

2) Then I need to delet cells in column a,b & C if certain cells are
empty.
Thanks for your help
Saziz


---
Message posted from http://www.ExcelForum.com/



  #3  
Old July 28th, 2004, 06:18 PM
Bob Umlas
external usenet poster
 
Posts: n/a
Default Setting range in a column where data ends

Enter the formula in C1, for example, then double-click the fill handle
(little square at bottom right of selection -- if not there, use
tools/options/Edit tab, check "Allow Cell Drag & Drop).

Not sure what you're asking in Q2.

Bob Umlas
Excel MVP

"saziz " wrote in message
...
Hi Guys,
I have two problems I trying to solve.

1) Column A & B has data (may be 500 rows) a formula is written in
Column C and I like to fill it down until column A & B has Data that
could be 500 to 1000 rows.

2) Then I need to delet cells in column a,b & C if certain cells are
empty.
Thanks for your help
Saziz


---
Message posted from http://www.ExcelForum.com/



  #4  
Old July 28th, 2004, 06:48 PM
saziz
external usenet poster
 
Posts: n/a
Default Setting range in a column where data ends

Bernie Deitrick wrote:
*Saziz,

The solution for the second part depends on what you mean by empty,
and the
solution of the first part may be different if your "empty" cells are
truly
empty, or if they appear empty from a formula returning "".

Try selecting your formula cell (after you have entered the formula)
and
double clicking the fill handle . That should copy down to match
column B's
length.

Post back with what you mean by empty...

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Hi Guys,
I have two problems I trying to solve.

1) Column A & B has data (may be 500 rows) a formula is written in
Column C and I like to fill it down until column A & B has Data

that
could be 500 to 1000 rows.

2) Then I need to delet cells in column a,b & C if certain cells

are
empty.
Thanks for your help
Saziz


---
Message posted from http://www.ExcelForum.com/
*


Hi Bernie,
This formula is in the middle of a macro. so I need to determine the
length of the range. If this can be done with a code I will put that
in.
My Q2 is related to Q1, the formula is such that if the answer is =0
that particular cell will be empty (no data) and I need to delet that
cell. However I got that working. If you can help me on Q1 That would
be wonderful.
Thank you for your patience and helping me.
Saziz


---
Message posted from http://www.ExcelForum.com/

  #5  
Old July 28th, 2004, 07:19 PM
Bernie Deitrick
external usenet poster
 
Posts: n/a
Default Setting range in a column where data ends

Saziz,

To enter a formula in cells C1:C?? to match column B:

Range("C1", Range("B65536").End(xlUp)(1, 2)).Formula = "=Your formula here"

where the "=Your formula here" part is the formula as written for cell C1,
with any quotes within the formula doubled. The easiest way to get the
actual syntax is to record a macro where you enter the formula in cell C1
(though you may then need to use .FormulaR1C1 instead of .Formula)

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Bernie Deitrick wrote:
*Saziz,

The solution for the second part depends on what you mean by empty,
and the
solution of the first part may be different if your "empty" cells are
truly
empty, or if they appear empty from a formula returning "".

Try selecting your formula cell (after you have entered the formula)
and
double clicking the fill handle . That should copy down to match
column B's
length.

Post back with what you mean by empty...

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Hi Guys,
I have two problems I trying to solve.

1) Column A & B has data (may be 500 rows) a formula is written in
Column C and I like to fill it down until column A & B has Data

that
could be 500 to 1000 rows.

2) Then I need to delet cells in column a,b & C if certain cells

are
empty.
Thanks for your help
Saziz


---
Message posted from http://www.ExcelForum.com/
*


Hi Bernie,
This formula is in the middle of a macro. so I need to determine the
length of the range. If this can be done with a code I will put that
in.
My Q2 is related to Q1, the formula is such that if the answer is =0
that particular cell will be empty (no data) and I need to delet that
cell. However I got that working. If you can help me on Q1 That would
be wonderful.
Thank you for your patience and helping me.
Saziz


---
Message posted from http://www.ExcelForum.com/



  #6  
Old July 28th, 2004, 09:11 PM
saziz
external usenet poster
 
Posts: n/a
Default Setting range in a column where data ends

Bernie Deitrick wrote:
*Saziz,

To enter a formula in cells C1:C?? to match column B:

Range("C1", Range("B65536").End(xlUp)(1, 2)).Formula = "=Your formula
here"

where the "=Your formula here" part is the formula as written for
cell C1,
with any quotes within the formula doubled. The easiest way to get
the
actual syntax is to record a macro where you enter the formula in
cell C1
(though you may then need to use .FormulaR1C1 instead of .Formula)

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Bernie Deitrick wrote:
*Saziz,

The solution for the second part depends on what you mean by

empty,
and the
solution of the first part may be different if your "empty" cells

are
truly
empty, or if they appear empty from a formula returning "".

Try selecting your formula cell (after you have entered the

formula)
and
double clicking the fill handle . That should copy down to

match
column B's
length.

Post back with what you mean by empty...

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Hi Guys,
I have two problems I trying to solve.

1) Column A & B has data (may be 500 rows) a formula is written

in
Column C and I like to fill it down until column A & B has

Data
that
could be 500 to 1000 rows.

2) Then I need to delet cells in column a,b & C if certain

cells
are
empty.
Thanks for your help
Saziz


---
Message posted from http://www.ExcelForum.com/
*


Hi Bernie,
This formula is in the middle of a macro. so I need to determine

the
length of the range. If this can be done with a code I will put

that
in.
My Q2 is related to Q1, the formula is such that if the answer is

=0
that particular cell will be empty (no data) and I need to delet

that
cell. However I got that working. If you can help me on Q1 That

would
be wonderful.
Thank you for your patience and helping me.
Saziz


---
Message posted from http://www.ExcelForum.com/
*


Hi Bernie,
It seems there isa problem how range is selected, it did not work. I
have attached the sheet so that you can take a look.
Thanks
saziz

Attachment filename: book3.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=631532
---
Message posted from http://www.ExcelForum.com/

  #7  
Old July 28th, 2004, 09:42 PM
Bernie Deitrick
external usenet poster
 
Posts: n/a
Default Setting range in a column where data ends

Saziz,

Sub MacroForSaziz()
Range("C2", Range("B65536").End(xlUp)(1, 2)).Formula =
"=IF(A3-B20,"""",A3-B2)"
End Sub

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Bernie Deitrick wrote:
*Saziz,

To enter a formula in cells C1:C?? to match column B:

Range("C1", Range("B65536").End(xlUp)(1, 2)).Formula = "=Your formula
here"

where the "=Your formula here" part is the formula as written for
cell C1,
with any quotes within the formula doubled. The easiest way to get
the
actual syntax is to record a macro where you enter the formula in
cell C1
(though you may then need to use .FormulaR1C1 instead of .Formula)

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Bernie Deitrick wrote:
*Saziz,

The solution for the second part depends on what you mean by

empty,
and the
solution of the first part may be different if your "empty" cells

are
truly
empty, or if they appear empty from a formula returning "".

Try selecting your formula cell (after you have entered the

formula)
and
double clicking the fill handle . That should copy down to

match
column B's
length.

Post back with what you mean by empty...

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Hi Guys,
I have two problems I trying to solve.

1) Column A & B has data (may be 500 rows) a formula is written

in
Column C and I like to fill it down until column A & B has

Data
that
could be 500 to 1000 rows.

2) Then I need to delet cells in column a,b & C if certain

cells
are
empty.
Thanks for your help
Saziz


---
Message posted from http://www.ExcelForum.com/
*


Hi Bernie,
This formula is in the middle of a macro. so I need to determine

the
length of the range. If this can be done with a code I will put

that
in.
My Q2 is related to Q1, the formula is such that if the answer is

=0
that particular cell will be empty (no data) and I need to delet

that
cell. However I got that working. If you can help me on Q1 That

would
be wonderful.
Thank you for your patience and helping me.
Saziz


---
Message posted from http://www.ExcelForum.com/
*


Hi Bernie,
It seems there isa problem how range is selected, it did not work. I
have attached the sheet so that you can take a look.
Thanks
saziz

Attachment filename: book3.xls
Download attachment:

http://www.excelforum.com/attachment.php?postid=631532
---
Message posted from http://www.ExcelForum.com/



  #8  
Old July 28th, 2004, 10:20 PM
saziz
external usenet poster
 
Posts: n/a
Default Setting range in a column where data ends

Bernie Deitrick wrote:
*Saziz,

Sub MacroForSaziz()
Range("C2", Range("B65536").End(xlUp)(1, 2)).Formula =
"=IF(A3-B20,"""",A3-B2)"
End Sub

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Bernie Deitrick wrote:
*Saziz,

To enter a formula in cells C1:C?? to match column B:


Bernie,
Thanks a bunch.
Saziz
Range("C1", Range("B65536").End(xlUp)(1, 2)).Formula = "=Your

formula
here"

where the "=Your formula here" part is the formula as written

for
cell C1,
with any quotes within the formula doubled. The easiest way to

get
the
actual syntax is to record a macro where you enter the formula

in
cell C1
(though you may then need to use .FormulaR1C1 instead of

.Formula)

HTH,
Bernie
MS Excel MVP

"saziz " wrote in message
...
Bernie Deitrick wrote:
*Saziz,

The solution for the second part depends on what you mean by
empty,
and the
solution of the first part may be different if your "empty"

cells
are
truly
empty, or if they appear empty from a formula returning "".

Try selecting your formula cell (after you have entered the
formula)
and
double clicking the fill handle . That should copy down to
match
column B's
length.

Post back with what you mean by empty...

HTH,
Bernie
MS Excel MVP

"saziz " wrote in

message
...
Hi Guys,
I have two problems I trying to solve.

1) Column A & B has data (may be 500 rows) a formula is

written
in
Column C and I like to fill it down until column A & B has
Data
that
could be 500 to 1000 rows.

2) Then I need to delet cells in column a,b & C if certain
cells
are
empty.
Thanks for your help
Saziz


---
Message posted from http://www.ExcelForum.com/
*

Hi Bernie,
This formula is in the middle of a macro. so I need to

determine

the
length of the range. If this can be done with a code I will

put
that
in.
My Q2 is related to Q1, the formula is such that if the answer

is
=0
that particular cell will be empty (no data) and I need to

delet
that
cell. However I got that working. If you can help me on Q1

That
would
be wonderful.
Thank you for your patience and helping me.
Saziz


---
Message posted from http://www.ExcelForum.com/
*


Hi Bernie,
It seems there isa problem how range is selected, it did not work.

I
have attached the sheet so that you can take a look.
Thanks
saziz

Attachment filename: book3.xls
Download attachment:

http://www.excelforum.com/attachment.php?postid=631532
---
Message posted from http://www.ExcelForum.com/
*



---
Message posted from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Select and Copy data in column. mick General Discussion 3 July 5th, 2004 03:53 PM
Countif with 2 or more data ranges in same column Doug Worksheet Functions 1 July 4th, 2004 08:57 AM
How to create graphs in a monthly report where the base data can change John Clarke Charts and Charting 3 June 25th, 2004 02:22 AM
Mial merge data base problems Rachael Mailmerge 16 May 21st, 2004 06:22 PM
Setting Source Data to a Named Range rather than cell Range Justin Smith Charts and Charting 2 December 5th, 2003 05:56 PM


All times are GMT +1. The time now is 11:53 PM.


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