ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Range formula - urgent! (https://www.excelbanter.com/excel-discussion-misc-queries/139511-range-formula-urgent.html)

Carole O

Range formula - urgent!
 
Excel 2003, SR 1

In a previous post, I asked about do loops, and the reply was to use range
instead - i.e.
Range(Range("J3"), Cells(Cells(Rows.Count, 1).End(xlUp).Row,
11)).Formula = _
"=IF(B3=""Employee:"",F3,"""")"

I thought I had it working, but something changed. The J column has numbers
in it until the data in the rows end. The problem seems to be that the
formula doesn't get placed in the K column (11).

This is a learning process for me, I'm not quite understanding this, just
doing what I'm told!

TIA,
Carole



Dave Peterson

Range formula - urgent!
 
I think I'd do something like:

Dim LastRow as long
with worksheets("sheet999") '<-- change this
lastrow = .cells(.rows.count,"A").end(xlup).row
.range("K3:K" & lastrow).formula = "=IF(B3=""Employee:"",F3,"""")"
end with


Carole O wrote:

Excel 2003, SR 1

In a previous post, I asked about do loops, and the reply was to use range
instead - i.e.
Range(Range("J3"), Cells(Cells(Rows.Count, 1).End(xlUp).Row,
11)).Formula = _
"=IF(B3=""Employee:"",F3,"""")"

I thought I had it working, but something changed. The J column has numbers
in it until the data in the rows end. The problem seems to be that the
formula doesn't get placed in the K column (11).

This is a learning process for me, I'm not quite understanding this, just
doing what I'm told!

TIA,
Carole


--

Dave Peterson

Jim Cone

Range formula - urgent!
 

Range("J3", Cells(Cells(Rows.Count, 1).End(xlUp).Row, 11)).Formula = _
"=IF(B3=""Employee:"",F3,"""")"
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Carole O"
wrote in message
Excel 2003, SR 1
In a previous post, I asked about do loops, and the reply was to use range
instead - i.e.
Range(Range("J3"), Cells(Cells(Rows.Count, 1).End(xlUp).Row,
11)).Formula = _
"=IF(B3=""Employee:"",F3,"""")"

I thought I had it working, but something changed. The J column has numbers
in it until the data in the rows end. The problem seems to be that the
formula doesn't get placed in the K column (11).

This is a learning process for me, I'm not quite understanding this, just
doing what I'm told!
TIA,
Carole




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com