Excel Hints & Tips - The OFFSET Function
How do I set my spreadsheet to automatically extract this month’s figure from the accounts?
Hi, we are Happy
We are leading a movement to create happy, empowered and productive workplaces.
How can we help you and your people to find joy in at least 80% of your work?
Let us assume the spread-sheet uses the standard accounts layout of figures for each month, so 12 columns of figures in all, for January to December. You want to indicate the current month with a number (1 for January, 2 for February etc) and have this month’s figure automatically displayed separately.
One approach is to use a very complicated IF statement:
IF(P1=1,C4,if(P1=2,D4,if(P1=3,E4 … and so on up to P1=12
However this is long-winded and complex and therefore invites errors. Our rule of thumb is if you get to three levels of Ifs, there is probably a simpler way to do it. And in this case there is a much simpler way.
The OFFSET Function
OFFSET is a neat little function which allows you to say, from any cell go 3 to the right and 4 down – or, better, use cell references. So to extract this month’s accounts:
P1 is the number of the month. B4 is the column before the financial data starts, and the 0 indicates you don’t want to move down a row. So it will take the value of C4 when when P1 is 1, D4 when P1 is 2 and so on.
Why not sign up to our newsletter?
Sign up to our monthly newsletter, full of tips, tricks and news to help you to be happier and more productive at work.
Darren is one of Happy's Senior Trainers, able to train almost every IT course on our course programme. He worked for Happy for 12 years and has been an Associate Trainer since 2018.
Testimonials from happy Customers
Siobhan Brennan-Robson3 days ago
Ebiji was an excellent teacher. I will be keeping her on speed dial.
Sophie Allen3 days ago
the initial invitation didn't come to all participants so I wasnt sure if the training was confirmed
Trusted Customer4 days ago
Amazing work! Honestly, I have had such a pleasant experience with Happy whether it be online or in their offices. Hopefully, in the future, I get to have more sessions w...
Trusted Customer6 days ago
I found the Office 365 training really useful. It consolidated my self-taught learning and showed me some new things that will make my life easier as well as doing some t...
Trusted Customer6 days ago
Found the session interactive and engaging throughout. Range of tools shared.
Helen Twigg7 days ago
Really enjoyed the Liberating Structures Online Immersion Workshop. High energy that kept you involved all day and have been able to use the learning immediately. Woul...
Ruth Gibbins7 days ago
Great facilitation, very interactive and organsied
Emma Willcox7 days ago
Great course, with lots of opportunity to practice techniques and not just learn about them. The day is packed full of content, so be ready to embrace the fast pace and t...
Judy Duff7 days ago
Happy are a creative, unique, relevant and modern-day approachers of workshop delivery and content.
Trusted Customer9 days ago
Excellent course and facilitator :) The course had good interactive sessions and well thought out content. It was made relevant to our roles and the trainer was supportiv...
Scott Haines10 days ago
I thought the training was excellent. It was really enjoyable and engaging and gave me lots of ideas to take away.
Toks Kinoshi10 days ago
An excellent session led by Henry where I learnt some new, refreshing techniques