Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default automatic formula

Is there anyway to format a worksheet to have the same formula used in every
cell, with the only difference being a different row number? For example, I
have a worksheet that I input orders for clients on, called the "order log,"
and I'm trying to make it as efficient as possible. On another worksheet, I
have a list of the client numbers in column A and the client names in column
B. On the Order Log, I want to type in the client number and have it
automatically populate the Client Name in the cell right next to it. I've
tried the lookup formula, which works, but I have to drag the formula down
EVERY time. So is there anyway to make it so whenever I type the client
number in, let's say, column 4, in column 5 the client name associated with
that number automatically populates?



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default automatic formula

If you have your lookup formula in the last filled row then this change event
sub shall fill down it to the current row:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 8 Then _
Cells(Target.Row - 1, Target.Column + 1).AutoFill _
Destination:=Range(Cells(Target.Row - 1, Target.Column + 1),
Cells(Target.Row, Target.Column + 1)), Type:=xlFillDefault
End Sub

Post if you need help to install it!

Regards,
Stefi


€žsamus€ť ezt Ă*rta:

Is there anyway to format a worksheet to have the same formula used in every
cell, with the only difference being a different row number? For example, I
have a worksheet that I input orders for clients on, called the "order log,"
and I'm trying to make it as efficient as possible. On another worksheet, I
have a list of the client numbers in column A and the client names in column
B. On the Order Log, I want to type in the client number and have it
automatically populate the Client Name in the cell right next to it. I've
tried the lookup formula, which works, but I have to drag the formula down
EVERY time. So is there anyway to make it so whenever I type the client
number in, let's say, column 4, in column 5 the client name associated with
that number automatically populates?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default automatic formula

Add an error trap to the formulas so if no data, the cells look blank.

=IF(ISNA(VLOOKUP(D1,Sheet2!A:B,2,FALSE)),"",VLOOKU P(D1,Sheet2!A:B,2,FALSE))

Copy down as far as you want.


Gord Dibben MS Excel MVP

On Wed, 7 Jan 2009 18:30:00 -0800, samus
wrote:

Is there anyway to format a worksheet to have the same formula used in every
cell, with the only difference being a different row number? For example, I
have a worksheet that I input orders for clients on, called the "order log,"
and I'm trying to make it as efficient as possible. On another worksheet, I
have a list of the client numbers in column A and the client names in column
B. On the Order Log, I want to type in the client number and have it
automatically populate the Client Name in the cell right next to it. I've
tried the lookup formula, which works, but I have to drag the formula down
EVERY time. So is there anyway to make it so whenever I type the client
number in, let's say, column 4, in column 5 the client name associated with
that number automatically populates?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic age range formula tjb Excel Worksheet Functions 7 September 20th 07 06:14 PM
Automatic Formula or Macro Jessica Excel Worksheet Functions 2 July 20th 07 07:50 AM
Automatic Fill of a Formula nabanco Excel Worksheet Functions 4 June 22nd 07 11:48 PM
Automatic Number Formula pinmaster Excel Discussion (Misc queries) 10 January 11th 07 02:58 AM
Automatic Formula to Value Conversion workerboy Excel Worksheet Functions 1 August 8th 06 07:59 PM


All times are GMT +1. The time now is 08:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"