Return data to the left based on next blank cell

dannywhite

New Member
Joined
Feb 28, 2016
Messages
1
Hi All,
Im sure there is an easy way to do this, after a fair bit of googling nothing seems to be fit what i am after hence the post.

I have weekly incremental data been entered into rows, i would like to return the last entry into another cell.

E.g

my formula would be in A1
the data
B1, C1, D1, E1 etc
this would grow
therefore i would like a formula to return the last value entered, the above case it would be E1, as the dataset grows i want A1 to automatically take the last entered value.

i was thinking of somehow searching the next blank cell and return the value to the left as a solution?

Welcome anyone help.

Cheers
Danny
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

skywriter

Well-known Member
Joined
Feb 15, 2014
Messages
1,642
Hi Danny,

You could try this formula in A1, it will get you to row A1000.
I'm not a big formula guy, I like writing code, but it works and maybe by posting this one of the formula gurus will come along and post something more efficient.
Code:
=OFFSET($A$2,COUNTA($A$2:$A$1000)-1,0)

Good Luck :cool:
 
Last edited:

FlameRetired

Active Member
Joined
Feb 19, 2016
Messages
339
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Another approach.

Code:
=LOOKUP(2,1/(B1:ZZ1<>""),B1:ZZ1)
Just be sure to use a suitably large enough column reference to include future data and minimize the need for future editing. Try to avoid the temptation to reference whole rows though.
 

skywriter

Well-known Member
Joined
Feb 15, 2014
Messages
1,642
Thanks Dave,

I guess I've got foggy head today.

Somehow I interpreted C1, D1 etc as going down column A.

(y)
 

FlameRetired

Active Member
Joined
Feb 19, 2016
Messages
339
Office Version
  1. 365
  2. 2007
Platform
  1. Windows

ADVERTISEMENT

Been there done that. Maybe something to do with the week-end. LOL
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,990
Messages
5,834,746
Members
430,315
Latest member
bobh63

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
Top