Have a Formula I want to put in to some Code Q

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have the following formula's which I want to use to populate some cells in
a range

The following I want to go into Sheet2 F2:
=VLOOKUP($C2,Master_Menu_Item_Nos,3,0)*E2

This next one I want to go into Sheet2G2:
=VLOOKUP($C2,Master_Menu_Item_Nos,4,0)*E2

Then I want to copy them down only until Cell E.... has a value in it. My
Column E is dynamic so I never can tell where it finishes (I get values in E
from a database query). So initially my Sheet2 will be blank, then I run my
database query, then I wish to populate the cells as above

Thanks
 
Hi
why not use a formula lie
=IF(E2<>"",VLOOKUP($C2,Master_Menu_Item_Nos,3,0)*E2,"")
and copy this down as far as needed
 
Reason I don't want to place a formula directly in the cell is that the
Sheet wil always start off Blank and I'll have a minimum of 18000 rows -
could nearly have a cup of tea in the time it will take to copy down!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top