Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Drop in and fill formula

Posted on 2015-02-17
4
Medium Priority
?
66 Views
Last Modified: 2015-02-19
Hi,

I have two pieces of formula that need to dropped into cells N2, O2 and filled down to how many rows our present in the sheet (count determined by Col A)

So if there are 2500 rows of data, the formula needs to fill (N2:O2500)

The formula in N  =VLOOKUP(K2,LOOKUP,7,0)
The formula in O  =VLOOKUP(K2,LOOKUP,4,0)

Many thanks
Seamus
0
Comment
Question by:Seamus2626
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40614527
and what's the problem?
0
 

Author Comment

by:Seamus2626
ID: 40614609
Hi Phillip,

I need vb code to auto fill "N" & "O" formula based on the count of rows in Column A

Thanks
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 2000 total points
ID: 40614612
Why not create a table, and then it can be autofilled?
0
 

Author Comment

by:Seamus2626
ID: 40614758
With Sheets("Data")
    R = .Range("A" & Rows.Count).End(xlUp).Row
   
    .Range("N1").Value = "KAM FLAG"
    .Range("O1").Value = "KAM GAM FLAG"
    .Range("N2").Formula = "=VLOOKUP(K2,LOOKUP,7,0)"
    .Range("O2").Formula = "=VLOOKUP(K2,LOOKUP,4,0)"
   
 

    .Range("N2:O2").Copy .Range("N2:O" & R)

End With

that's what I needed Phillip!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

705 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