Can I insert a formula using a VLOOKUP?

alleneure

New Member
Joined
Feb 22, 2023
Messages
22
Office Version
  1. 365
Platform
  1. Windows
I have a set of formulas on a separate sheet from where I need them. I have them listed as the person and the formula needed to calculate their specific value. If I try to use a VLOOKUP the equation populates but acts as text and not a formula. I've also tried using an INDIRECT function to add an "=" before and the formula still didn't work. Is there a way to pull a formula from a data set like this or will I have to use a bunch of nested IF statements?

Below is similar to how I have the sheet laid out. I can't put a = sign in the function bow because the formula has a [@Date] portion that is used to call on a date column in the table I'm trying to get the function into. I can provide screenshots if needed. Any thoughts or ideas?
Name 1IF(....
Name 2IF(....
Name 3IF(...
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
if you want to use the cell contents withing a formula - then you can use indirect()

for example a cell contains a cell reference ie contains A1 and you want to use A1 as a cell reference -
or a name is in a cell say C12 - like sheet4 and you want to use that as a range reference in a formula then indirect

But i'm not following your example as to what you are trying to do

what do you want the vlookup formula to be - if you type it out manually - so we can see

for example if you had sheet4 in a cell and wanted to use that in a vlookup

=VLOOKUP(A4,INDIRECT(A2&"!A2:B5"),2,FALSE)

so instead of
=vlookup(Sheet4!A2:A5,2,false)
we use the contents of A2 as the sheet name, using indirect()


Book26
AB
1
2sheet4
3
4A1
Sheet1
Cell Formulas
RangeFormula
B4B4=VLOOKUP(A4,INDIRECT(A2&"!A2:B5"),2,FALSE)


Book26
AB
1
2a1
3b2
4c3
sheet4
 
Upvote 0
So I have the below functions in a sheet labeled equations but I have also names the equation sets. So the 5 equations under function are name AutofillFunction and the ones under reason are AutofillReason etc.
1681823732957.png


Below is where I am trying to fill in the formula from the equations sheet.
1681823812974.png

1681823837195.png

Under function and Reason for visit i have a XLOOKUP to look for holidays in a schedule but then the VLOOKUP is the equation I want if there is not a holiday.

For customer and location I just the equation for each individual name and tried to do that with the formula below. But in this format it will just insert the formula as text.
1681823851321.png


Below is what populates using the above formula.
1681824214191.png


Is there a way to use a VLOOKUP or some function to make the above equations calculate?
 
Upvote 0

Forum statistics

Threads
1,223,877
Messages
6,175,137
Members
452,614
Latest member
MRSWIN2709

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