you're welcome
yes, VBA
start the
Visual
Basic
Editor (via Menu Tools, Macro or press ALT+F11).
On the Insert menu in the
VBE, click Module. (if necessary)
In the module (the white area at the right), paste the following code or your code:
to run the code
click anywhere in the code and hit function key F5
or
via Excel menu: Tools / Macro / Macros (or hit Alt+F8)
assign shortcutkey
menu Tools/Macro/Macros
select your macro
click options
choose a character as shortcut: example
T
to run the macro press Ctrl+Shift+T
programmer ?
not at all, I'm a pianist-musician
how I learned VBA
1. use the macro recorder to see how code is generated (such code will need some "cleaning" afterwards)
2. "step" through it with the function key F8, while observing what's going on on your sheet
3. click on an item and hit F1 to let popup the help
4. add some steps to see what's going on in your code
example
add: MsgBox "you're currently on this sheet :" & ActiveSheet.Name & Chr(10) & Cell(i, j).Address & "will be filled with the value" & tmp
or before running click in the line and hit F9 (inserting a breakpoint)
also:
1. visit this forum, browse & search and start to
answer the questions instead of asking them
that's how I learned it: just to encourage you ... you don't need to be a programmer
2. browse the menus and all submenus to see the stuff
3. browse the helpfiles in Excel-helpfiles ...
very important: be curious and stay curious
most important: PLAY with the stuff
(OK, programmers can do it better using some "inside-tricks")