How to write (Selected range - 1)

  • Thread starter Thread starter Damian
  • Start date Start date
D

Damian

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.
 
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...?
 
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 said:
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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top