Return Cell Address with VBA

another rachel

Board Regular
Joined
May 27, 2002
Messages
80
Hello
I am trying to see if the macro I have started to write is working.
However, forget how to use the msgbax command....

I have written the following and would like the macro to return the cell reference of the first empty cell.

I know this is easy as I have done it before but can't remember how :oops:

Any assistance, as akways, is much appreciated
Regads
Rachel
Code:
Dim lastnumber As Range
Dim firstemptycell As Range

Set lastnumber = Range("A65536").End(xlUp)
Set firstemptycell = lastnumber.Offset(rowoffset:=1, columnoffset:=0)
 
Re: using last cell refrence

A) Talk to your boss. Get her/him to get the IT Nazis to give you the configuration you need to be productive.
B) If you have web access, msdn.microsoft.com has most (all?) of the MS help files in one form or another.

another rachel said:
Thank you!

In a very annoying move, the helpfile in VBA Excel has been "switched off" at my place of work. :x
{snip}
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top