Data input = automatic formula input

Rbboon

New Member
Joined
Jul 20, 2017
Messages
13
Is there a way that a formula can be automatically applied to a cell if specific data is input in another?

For example:
If "vendor" is typed in B2, (specified formula) is automatically embedded in F2.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Can you post what the secified formula should be ?
And confirm that the specified formula in fact works by itself.
 
Upvote 0
Yes, the formula works by itself: VLOOKUP($B73,'C:\PD\[Invoicing Lookup.xlsx]Invoice VLOOKUP'!$1:$1048576,4,0)

Thank you for the help
[TABLE="width: 64"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
 
Upvote 0
And what was the full formula you put in F2?

Based on this from Jonmo1:
=IF(B2="vendor",specifiedformula,"")

The formula you should try is:
=IF(B2="vendor",VLOOKUP($B73,'C:\PD\[Invoicing Lookup.xlsx]Invoice VLOOKUP'!$1:$1048576,4,0),"")
 
Upvote 0
Try

=IF(B2="vendor",VLOOKUP($B73,'C:\PD\[Invoicing Lookup.xlsx]Invoice VLOOKUP'!$1:$1048576,4,0),"")

Though I recommend not referencing the entire sheet in your vlookup.
Try
=IF(B2="vendor",VLOOKUP($B73,'C:\PD\[Invoicing Lookup.xlsx]Invoice VLOOKUP'!$A:$D,4,0),"")
 
Upvote 0
Try

=IF(B2="vendor",VLOOKUP($B73,'C:\PD\[Invoicing Lookup.xlsx]Invoice VLOOKUP'!$1:$1048576,4,0),"")

Though I recommend not referencing the entire sheet in your vlookup.
Try
=IF(B2="vendor",VLOOKUP($B73,'C:\PD\[Invoicing Lookup.xlsx]Invoice VLOOKUP'!$A:$D,4,0),"")

THANK YOU!!!! It works like a charm.
Why does excluding the sheet as a reference make such a difference?
 
Upvote 0
You're welcome.

Not sure I follow what you're asking now.
Are you referring to me saying not to reference the entire sheet ?
I mean that $1:$1048576 is actually a reference to every single cell on the entire sheet.
That gets loaded into memory when you run the formula.
Changing it to A:D greatly reduces the number of cells referenced and loaded into memory.
In fact, it would be even better if you reduced it to a specific number of rows as well, like A$2:D$1000
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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