Copy or refer to last Entry in a Row

BillHassall

New Member
Joined
Nov 11, 2009
Messages
42
I have searched through a number of posts and can't find anything that refers to this.
What I want to do is either create a formula in a cell that refers to the last populated cell in a different worksheet e.g for instance today I will populate AT2 and tomorrow AU2, the next day AV3 and I want this data on my daily report.

Alternatively I am using code to already copy and paste information, so I just need to find out how I refere to the last populated cell in a row, I have tried all manner of xldown and end and rows.count, buut can't get anything to work

Thanks

Bill
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Do you mean VBA code or an Excel formula?

VBA code:
Code:
=Cells(2,Columns.Count).End(xlToLeft).Select
Excel formula:
Code:
=HLOOKUP(9.99999999999999E+307,2:2,TRUE,TRUE)
I usually name that long number as a named range, e.g. BigNum so formula is easier to read, i.e:
Code:
=HLOOKUP(BigNum,2:2,TRUE,TRUE)
 
Upvote 0
Thanks for the quick reply, the Hlookup works a treat and so does the VBA apart from the fact that I have formulas in all of the cells going forward that return "" values if other cells are empty and instead of going to the last cell with a number in it, it goes to the last cell with a formula in it. Is it possible to refer to the last cell with a result rather than a formula

Thw xltoleft is what I have been looking for so thanks again

Bill
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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