Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Macro trigger?

You could do it with VBA, but I don't feel like trying to create the code.

The quickest and most straightforward way would be to place nested IF and
VLOOKUP formulas into the I, J, and K columns, especially since you already
have a table of letter/value assignments on another sheet in the same file.

For example, Cell I2 contains:

=IF($F2="",0,VLOOKUP($F2,'Sheet2'!$A$1:$B$26,2))

This assumes that your table of values is on Sheet2 in the range A1 to B26,
with the code letters in column A (in alphabetical order) and the values in
column B.

This formula will return a value of 0 (zero) until a letter is typed into
the F column. The formula above only needs to be typed once into cell I2.
You can then drag-copy the formula across cells J2 and K2. Then select all
three cells and drag-copy the formula down the sheet as far as you need. The
columnar F reference will remain locked when dragging sideways, but the row
references will change as you drag down.

Hope this helps.

"trot4 " wrote in message
...
If anyone can help me on this one, it would be much appreciated. I want
to be able to type a letter in a cell and have it automatically execute
some action. More specifically, I have letter codes I will be entering
into column F.

For example, I would like to be able to enter the letter "B" into F2
and have excel place values of 10,000,000 in cells I2 and J2
automatically. Or another case would be entering the letter "A" in F3
and have excel place values of 15,000,000 in I3, J3, and K3.

The code "B" would always need the value placed in the 2 cells starting
3 columns to the right of where the code is input. Likewise, "A" would
always need the associated value placed in the 3 cells starting 3
columns to the right of the input cell and so on.

I already have tables of the codes and what values they represent on
another worksheet. I just need to be able to take those values and have
excel place them in the designated cells automatically upon entering
the code.

I hope I explained what it is I wish to accomplish. Thanks again.

Trot


---
Message posted from http://www.ExcelForum.com/



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
Trigger Macro by Worksheet_Change JSnow Excel Discussion (Misc queries) 5 October 2nd 08 06:27 PM
Using date as trigger for macro Mike Milmoe Excel Discussion (Misc queries) 3 May 10th 07 06:43 PM
macro trigger Leslieac Excel Discussion (Misc queries) 3 February 2nd 06 09:08 PM
how to trigger macro or force autofit lcoreyl Excel Programming 3 October 28th 03 04:27 PM
EXCEL: trigger web query from macro? Krick Excel Programming 0 August 5th 03 09:12 PM


All times are GMT +1. The time now is 11:05 AM.

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

About Us

"It's about Microsoft Excel"