Lookup problem

Karen123

New Member
Joined
Mar 18, 2010
Messages
33
Hello

I'm creating a table i want to update with the latest data. Part of the data will show % satisfaction for the last three months. I need the month names to update automatically. I've added a cell (B2) which will be updated with the latest month.

'This month' info will then update in the table. However, if the latest month is July, i want the table headings next to the 'July/Current month' column to show the previous month and the month before that.

The best solution i could think of was a lookup, so i've created a hidden table. List of months in (J), the corresponding previous month in (K) and the month before that in (L). The formulas on the three months columns are:

Current month column - =B2
Previous month column - =LOOKUP(B2, j:j,k:k)
2 months previous - =LOOKUP(B2,j:j,l:l)

However, only the current month is updating with these formulas. Can anyone help?

Thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
try keeping the values as actual dates, and change the formatting

You can use =TODAY(), formatted as mmm to show this month

EOMONTH(today(),-1) will give last day of last month, again formatted as mmm only will just show last month. Use -2 for month before...
 
Upvote 0
Hello

Thanks very much for getting back to me. I couldn't get excel to recognise the month(s) previous formulas, but i typed it into google and i think it's because i have an older version of excel. This alternative was suggested on another forum those affected:
=DATE(YEAR(NOW()),MONTH(NOW())-1,0)

Thanks again
 
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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