1

I'm trying to use arrayformula to expand the formula below but it's not working. When I copy-paste manually the formula into each cell it works.

=arrayformula(INDEX($1:$100,ROW(B2:B),match(YEAR(M$1:$1),$1:$1,0)))

What I want to achieve is to convert yearly salaries into monthly salaries based on years.

The spreadsheet can be viewed here: https://docs.google.com/spreadsheets/d/1veiYh1CMIfFPwBGQk4OwKmCLa7q08TugReVfAXtpIgI/edit#gid=1363287956

Thanks!

2
  • The sheet doesn't allow access. Commented Mar 5, 2021 at 16:56
  • Sorry it's fixed! Commented Mar 5, 2021 at 17:00

1 Answer 1

1

Solution:

Since you are looking for a specific column, you can use HLOOKUP as a substitute for INDEX and MATCH:

=ARRAYFORMULA(HLOOKUP(YEAR(M1:AT1),A1:H11,ROW(B2:B11))/12)

This should yield the same result as the previous formula:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.