Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Identifying Top row

I have 20 rows,


if the first row is the 5th row e.g.A5 or B5,
then I want Y5 = "GM" ETC.ETC.

So something like:

Y(Cells(Rows.Count, 1).End(xlUp).Row)= "GM"

obviously not End(xlUp).Row but something similar

Thks



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Identifying Top row

Range("Y" & Cells(Rows.Count, 1).End(xlUp).Row).Value = "GM"

--
Regards,
Tom Ogilvy

"teresa" wrote in message
...
I have 20 rows,


if the first row is the 5th row e.g.A5 or B5,
then I want Y5 = "GM" ETC.ETC.

So something like:

Y(Cells(Rows.Count, 1).End(xlUp).Row)= "GM"

obviously not End(xlUp).Row but something similar

Thks





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Identifying Top row

Tom Ogilvy wrote:
Range("Y" & Cells(Rows.Count, 1).End(xlUp).Row).Value = "GM"

Doesn't do it; if you want the first row in Column A to control try

Range("Y" & Range("A1").End(xlDown).Row).Value = "GM"

If you want Column B to control, change the A1 to B1

Alan Beban
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Identifying Top row

Thanks, misread the question.

--
Regards,
Tom Ogilvy

"Alan Beban" wrote in message
...
Tom Ogilvy wrote:
Range("Y" & Cells(Rows.Count, 1).End(xlUp).Row).Value = "GM"

Doesn't do it; if you want the first row in Column A to control try

Range("Y" & Range("A1").End(xlDown).Row).Value = "GM"

If you want Column B to control, change the A1 to B1

Alan Beban



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 733
Default Identifying Top row

"Alan Beban" wrote...
....
Doesn't do it; if you want the first row in Column A to control try

Range("Y" & Range("A1").End(xlDown).Row).Value = "GM"

If you want Column B to control, change the A1 to B1


Doesn't work if A1 (or B1) is the only nonblank cell in its column. And if
A1:A# were all nonblank, this would give the bottommost row in that range of
nonblank cells.

If col A should control, shouldn't this be

Range("Y" & IIf(IsEmpty(Range("A1").Value), _
Range("A1").End(xlDown).Row, 1)).Value = "GM"




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
Identifying currencies [email protected] Excel Discussion (Misc queries) 7 October 25th 07 12:31 PM
Identifying famdamly Excel Discussion (Misc queries) 2 February 26th 06 06:44 AM
Identifying #N/A cells Lee Harris Excel Worksheet Functions 1 November 18th 05 02:57 AM
Identifying links Andrew Excel Discussion (Misc queries) 2 June 30th 05 01:17 PM
Identifying a value jtrevill[_4_] Excel Programming 1 November 18th 04 05:56 PM


All times are GMT +1. The time now is 12:10 PM.

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

About Us

"It's about Microsoft Excel"