Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default How to write (Selected range - 1)

I have a defined Name [Last], but I would like it to take 1 wor before [Last]

Right now I have Range("B31:O31", [Last])

I wnat it to be Range("B31:O31", [Last]-1) or something.

How would I put this?

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default How to write (Selected range - 1)

Is this in VBA or a spreadsheet formula?

[Last] would be an address if you want to work with the rows then
[Last].Row-1 woud be a start. And if Last is supposed to be an address, then
what would one mean by Last -1? Suppose Last is O31 is Last-1 N31 or O30
or...?

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Damian" wrote:

I have a defined Name [Last], but I would like it to take 1 wor before [Last]

Right now I have Range("B31:O31", [Last])

I wnat it to be Range("B31:O31", [Last]-1) or something.

How would I put this?

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default How to write (Selected range - 1)

This is in VBA code.
Last is defined as "B104:O104" This will stay constant and will change if
rows are deleted..

So If I want to do an operation one Row before Last I can use what you said?
[Last].Row-1?

Thank you

"Shane Devenshire" wrote:

Is this in VBA or a spreadsheet formula?

[Last] would be an address if you want to work with the rows then
[Last].Row-1 woud be a start. And if Last is supposed to be an address, then
what would one mean by Last -1? Suppose Last is O31 is Last-1 N31 or O30
or...?

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Damian" wrote:

I have a defined Name [Last], but I would like it to take 1 wor before [Last]

Right now I have Range("B31:O31", [Last])

I wnat it to be Range("B31:O31", [Last]-1) or something.

How would I put this?

Thank you.

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
How do I write formula to check a range of cells? Tayo Excel Worksheet Functions 5 August 27th 09 06:53 PM
Write macro to lock selected sheet when run office3000 Excel Discussion (Misc queries) 1 October 14th 08 07:49 PM
How do I write an Excel macro when the cell range changes weekly? AT Excel Discussion (Misc queries) 3 December 13th 07 12:46 AM
Appearance of a selected range d_mack Excel Discussion (Misc queries) 10 October 5th 07 01:31 AM
How to write a quote formula using only the cells selected with va Novice Excel Worksheet Functions 3 October 30th 06 02:07 PM


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