Solved

kup that will return a formula

Posted on 2015-01-27
3
75 Views
Last Modified: 2015-01-27
can an expert help with this problem please.

I need to lookup column P in my current sheet and then find this in my sheet called Static. [I have called the data range in the sheet static Agebands]

column A in Agebands contains the name of various countries, column E contains formulas which is what I would like my vlookup to return.

so an normal vlookup i.e. =VLOOKUP(P9,AgeBands,4,0)  would return >45 but what I need it to return is the formula in E which is =IF(S2<=30,Static!$B$7,IF(Spain!S2<45,Static!$C$7,IF(Spain!S2>45,Static!$D$7)))

can anyone help?
0
Comment
Question by:Jagwarman
  • 2
3 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
Comment Utility
Use =FormulaInE(match(P9,Static!A:A,0))

And in a VBA module

Function FormulaInE(introw)
FormulaInE = sheets("Static").cells(introw,5).Formula
End Function
0
 

Author Comment

by:Jagwarman
Comment Utility
Hi Phillip,

Hmm! maybe what I was hoping for won't work. Your code does get the formula, it picks up the formula from the static sheet but instead of returning the answer >45 it shows the formula
=IF(S2<=30,Static!$B$7,IF(Spain!S2<45,Static!$C$7,IF(Spain!S2>45,Static!$D$7)))
in the cell.

So I guess it's not possible to get it to put out the result rather than the formula ??
0
 

Author Comment

by:Jagwarman
Comment Utility
I take that back, I have worked out how to make it perform the calculation.

Many thanks Phillip.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now