ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatic Macro (https://www.excelbanter.com/excel-programming/314253-automatic-macro.html)

Momo

Automatic Macro
 
Hi can anyone help,

I have created a dropdown list in excel using data validation which I am
then using via lookups to fill in a table below, but some of the column
headers are merged by two cells and others by four, is there any way to
create a macro by when a selection is made via the dropdown list it will
format the merged cells accordingly,

Thanks

Tom Ogilvy

Automatic Macro
 
In xl2000 and higher, the worksheet_change event should fire when a
selection is made from the drodown list.

the cell triggering the event is passed in the Target argument. You can
check that in your code to see if a selection was made to the dropdown and
then perform the formatting if warranted.

See Chip Pearson's page on events
http://www.cpearson.com/excel/events.htm

if you need more information on events.

--
Regards,
Tom Ogilvy


"Momo" wrote in message
...
Hi can anyone help,

I have created a dropdown list in excel using data validation which I am
then using via lookups to fill in a table below, but some of the column
headers are merged by two cells and others by four, is there any way to
create a macro by when a selection is made via the dropdown list it will
format the merged cells accordingly,

Thanks





All times are GMT +1. The time now is 03:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com