Stop macro if cell selected

Hi,

First time & new to excel macros. I have a macro which copies data &
inserts it into a viewable summary sheet which can be printed. The
range is 6 cells & if cell k7 is selected I want to stop the macro. I
have attempted to use IF command with Then End but it ignores it. Here
is my macro:

' refence point to start pasting sequence
    Sheets("Alfa data").Select
    Range("C225").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Sheet4").Select
    Range("c7").Select
    Selection.End(xlToRight).Select
    ActiveCell.Offset(0, 1).Select
    If ActiveCell.Address = "K7" Then End    'This is my problem area,
I want it to stop here.
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
        :=False, Transpose:=False
    Sheets("Alfa Data").Select
    Range("C226").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Sheet4").Select
    Range("c7").Select
    Selection.End(xlToRight).Select
    ActiveCell.Offset(2, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
        :=False, Transpose:=False
    Application.ScreenUpdating = True
    Application.CutCopyMode = False
    Range("A1").Select

0
12/29/2006 1:15:04 PM
excel 39879 articles. 2 followers. Follow

5 Replies
641 Views

Similar Articles

[PageSpeed] 24

 If ActiveCell.Address = "K7"
 If ActiveCell.Address = "$K$7" then exit sub
You need to re-write to avoid selections since they are rarely necessary or 
desirable.
example of a one liner
Sheets("Alfa data").range("C225").Copy 
Sheets("Sheet4").Range("c7").End(xlToRight).Offset(,1)

-- 
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
<carruthers@metronet.co.uk> wrote in message 
news:1167398104.340876.130090@48g2000cwx.googlegroups.com...
> Hi,
>
> First time & new to excel macros. I have a macro which copies data &
> inserts it into a viewable summary sheet which can be printed. The
> range is 6 cells & if cell k7 is selected I want to stop the macro. I
> have attempted to use IF command with Then End but it ignores it. Here
> is my macro:
>
> ' refence point to start pasting sequence
>    Sheets("Alfa data").Select
>    Range("C225").Select
>    Application.CutCopyMode = False
>    Selection.Copy
>    Sheets("Sheet4").Select
>    Range("c7").Select
>    Selection.End(xlToRight).Select
>    ActiveCell.Offset(0, 1).Select
>    If ActiveCell.Address = "K7" Then End    'This is my problem area,
> I want it to stop here.
>    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
> SkipBlanks _
>        :=False, Transpose:=False
>    Sheets("Alfa Data").Select
>    Range("C226").Select
>    Application.CutCopyMode = False
>    Selection.Copy
>    Sheets("Sheet4").Select
>    Range("c7").Select
>    Selection.End(xlToRight).Select
>    ActiveCell.Offset(2, 0).Select
>    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
> SkipBlanks _
>        :=False, Transpose:=False
>    Application.ScreenUpdating = True
>    Application.CutCopyMode = False
>    Range("A1").Select
> 


0
dguillett1 (2487)
12/29/2006 1:33:55 PM
Don,

Adding "sub" did the trick, this is exactly what I needed to happen.
Thank you very much.
Don Guillett wrote:

> If ActiveCell.Address = "K7"
>  If ActiveCell.Address = "$K$7" then exit sub
> You need to re-write to avoid selections since they are rarely necessary or
> desirable.
> example of a one liner
> Sheets("Alfa data").range("C225").Copy
> Sheets("Sheet4").Range("c7").End(xlToRight).Offset(,1)
>
> --
> Don Guillett
> SalesAid Software
> dguillett1@austin.rr.com
> <carruthers@metronet.co.uk> wrote in message
> news:1167398104.340876.130090@48g2000cwx.googlegroups.com...
> > Hi,
> >
> > First time & new to excel macros. I have a macro which copies data &
> > inserts it into a viewable summary sheet which can be printed. The
> > range is 6 cells & if cell k7 is selected I want to stop the macro. I
> > have attempted to use IF command with Then End but it ignores it. Here
> > is my macro:
> >
> > ' refence point to start pasting sequence
> >    Sheets("Alfa data").Select
> >    Range("C225").Select
> >    Application.CutCopyMode = False
> >    Selection.Copy
> >    Sheets("Sheet4").Select
> >    Range("c7").Select
> >    Selection.End(xlToRight).Select
> >    ActiveCell.Offset(0, 1).Select
> >    If ActiveCell.Address = "K7" Then End    'This is my problem area,
> > I want it to stop here.
> >    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
> > SkipBlanks _
> >        :=False, Transpose:=False
> >    Sheets("Alfa Data").Select
> >    Range("C226").Select
> >    Application.CutCopyMode = False
> >    Selection.Copy
> >    Sheets("Sheet4").Select
> >    Range("c7").Select
> >    Selection.End(xlToRight).Select
> >    ActiveCell.Offset(2, 0).Select
> >    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
> > SkipBlanks _
> >        :=False, Transpose:=False
> >    Application.ScreenUpdating = True
> >    Application.CutCopyMode = False
> >    Range("A1").Select
> >

0
1/3/2007 9:01:53 AM
Are you sure? Did you change the address to "$K$7" with the $$$$?
Did you re-write to remove selections?

-- 
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
<carruthers@metronet.co.uk> wrote in message 
news:1167814913.628008.322940@a3g2000cwd.googlegroups.com...
> Don,
>
> Adding "sub" did the trick, this is exactly what I needed to happen.
> Thank you very much.
> Don Guillett wrote:
>
>> If ActiveCell.Address = "K7"
>>  If ActiveCell.Address = "$K$7" then exit sub
>> You need to re-write to avoid selections since they are rarely necessary 
>> or
>> desirable.
>> example of a one liner
>> Sheets("Alfa data").range("C225").Copy
>> Sheets("Sheet4").Range("c7").End(xlToRight).Offset(,1)
>>
>> --
>> Don Guillett
>> SalesAid Software
>> dguillett1@austin.rr.com
>> <carruthers@metronet.co.uk> wrote in message
>> news:1167398104.340876.130090@48g2000cwx.googlegroups.com...
>> > Hi,
>> >
>> > First time & new to excel macros. I have a macro which copies data &
>> > inserts it into a viewable summary sheet which can be printed. The
>> > range is 6 cells & if cell k7 is selected I want to stop the macro. I
>> > have attempted to use IF command with Then End but it ignores it. Here
>> > is my macro:
>> >
>> > ' refence point to start pasting sequence
>> >    Sheets("Alfa data").Select
>> >    Range("C225").Select
>> >    Application.CutCopyMode = False
>> >    Selection.Copy
>> >    Sheets("Sheet4").Select
>> >    Range("c7").Select
>> >    Selection.End(xlToRight).Select
>> >    ActiveCell.Offset(0, 1).Select
>> >    If ActiveCell.Address = "K7" Then End    'This is my problem area,
>> > I want it to stop here.
>> >    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
>> > SkipBlanks _
>> >        :=False, Transpose:=False
>> >    Sheets("Alfa Data").Select
>> >    Range("C226").Select
>> >    Application.CutCopyMode = False
>> >    Selection.Copy
>> >    Sheets("Sheet4").Select
>> >    Range("c7").Select
>> >    Selection.End(xlToRight).Select
>> >    ActiveCell.Offset(2, 0).Select
>> >    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
>> > SkipBlanks _
>> >        :=False, Transpose:=False
>> >    Application.ScreenUpdating = True
>> >    Application.CutCopyMode = False
>> >    Range("A1").Select
>> >
> 


0
dguillett1 (2487)
1/3/2007 1:10:29 PM
Hi Don,

Yes I added the $'s, I also removed the selections. Very neat.

Thank you again.

Don Guillett wrote:

> Are you sure? Did you change the address to "$K$7" with the $$$$?
> Did you re-write to remove selections?
>
> --
> Don Guillett
> SalesAid Software
> dguillett1@austin.rr.com
> <carruthers@metronet.co.uk> wrote in message
> news:1167814913.628008.322940@a3g2000cwd.googlegroups.com...
> > Don,
> >
> > Adding "sub" did the trick, this is exactly what I needed to happen.
> > Thank you very much.
> > Don Guillett wrote:
> >
> >> If ActiveCell.Address = "K7"
> >>  If ActiveCell.Address = "$K$7" then exit sub
> >> You need to re-write to avoid selections since they are rarely necessary
> >> or
> >> desirable.
> >> example of a one liner
> >> Sheets("Alfa data").range("C225").Copy
> >> Sheets("Sheet4").Range("c7").End(xlToRight).Offset(,1)
> >>
> >> --
> >> Don Guillett
> >> SalesAid Software
> >> dguillett1@austin.rr.com
> >> <carruthers@metronet.co.uk> wrote in message
> >> news:1167398104.340876.130090@48g2000cwx.googlegroups.com...
> >> > Hi,
> >> >
> >> > First time & new to excel macros. I have a macro which copies data &
> >> > inserts it into a viewable summary sheet which can be printed. The
> >> > range is 6 cells & if cell k7 is selected I want to stop the macro. I
> >> > have attempted to use IF command with Then End but it ignores it. Here
> >> > is my macro:
> >> >
> >> > ' refence point to start pasting sequence
> >> >    Sheets("Alfa data").Select
> >> >    Range("C225").Select
> >> >    Application.CutCopyMode = False
> >> >    Selection.Copy
> >> >    Sheets("Sheet4").Select
> >> >    Range("c7").Select
> >> >    Selection.End(xlToRight).Select
> >> >    ActiveCell.Offset(0, 1).Select
> >> >    If ActiveCell.Address = "K7" Then End    'This is my problem area,
> >> > I want it to stop here.
> >> >    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
> >> > SkipBlanks _
> >> >        :=False, Transpose:=False
> >> >    Sheets("Alfa Data").Select
> >> >    Range("C226").Select
> >> >    Application.CutCopyMode = False
> >> >    Selection.Copy
> >> >    Sheets("Sheet4").Select
> >> >    Range("c7").Select
> >> >    Selection.End(xlToRight).Select
> >> >    ActiveCell.Offset(2, 0).Select
> >> >    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
> >> > SkipBlanks _
> >> >        :=False, Transpose:=False
> >> >    Application.ScreenUpdating = True
> >> >    Application.CutCopyMode = False
> >> >    Range("A1").Select
> >> >
> >

0
1/3/2007 4:51:21 PM
Just wanted to make sure that you were learning to do it properly.

-- 
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
<carruthers@metronet.co.uk> wrote in message 
news:1167843081.862396.248170@i12g2000cwa.googlegroups.com...
> Hi Don,
>
> Yes I added the $'s, I also removed the selections. Very neat.
>
> Thank you again.
>
> Don Guillett wrote:
>
>> Are you sure? Did you change the address to "$K$7" with the $$$$?
>> Did you re-write to remove selections?
>>
>> --
>> Don Guillett
>> SalesAid Software
>> dguillett1@austin.rr.com
>> <carruthers@metronet.co.uk> wrote in message
>> news:1167814913.628008.322940@a3g2000cwd.googlegroups.com...
>> > Don,
>> >
>> > Adding "sub" did the trick, this is exactly what I needed to happen.
>> > Thank you very much.
>> > Don Guillett wrote:
>> >
>> >> If ActiveCell.Address = "K7"
>> >>  If ActiveCell.Address = "$K$7" then exit sub
>> >> You need to re-write to avoid selections since they are rarely 
>> >> necessary
>> >> or
>> >> desirable.
>> >> example of a one liner
>> >> Sheets("Alfa data").range("C225").Copy
>> >> Sheets("Sheet4").Range("c7").End(xlToRight).Offset(,1)
>> >>
>> >> --
>> >> Don Guillett
>> >> SalesAid Software
>> >> dguillett1@austin.rr.com
>> >> <carruthers@metronet.co.uk> wrote in message
>> >> news:1167398104.340876.130090@48g2000cwx.googlegroups.com...
>> >> > Hi,
>> >> >
>> >> > First time & new to excel macros. I have a macro which copies data &
>> >> > inserts it into a viewable summary sheet which can be printed. The
>> >> > range is 6 cells & if cell k7 is selected I want to stop the macro. 
>> >> > I
>> >> > have attempted to use IF command with Then End but it ignores it. 
>> >> > Here
>> >> > is my macro:
>> >> >
>> >> > ' refence point to start pasting sequence
>> >> >    Sheets("Alfa data").Select
>> >> >    Range("C225").Select
>> >> >    Application.CutCopyMode = False
>> >> >    Selection.Copy
>> >> >    Sheets("Sheet4").Select
>> >> >    Range("c7").Select
>> >> >    Selection.End(xlToRight).Select
>> >> >    ActiveCell.Offset(0, 1).Select
>> >> >    If ActiveCell.Address = "K7" Then End    'This is my problem 
>> >> > area,
>> >> > I want it to stop here.
>> >> >    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
>> >> > SkipBlanks _
>> >> >        :=False, Transpose:=False
>> >> >    Sheets("Alfa Data").Select
>> >> >    Range("C226").Select
>> >> >    Application.CutCopyMode = False
>> >> >    Selection.Copy
>> >> >    Sheets("Sheet4").Select
>> >> >    Range("c7").Select
>> >> >    Selection.End(xlToRight).Select
>> >> >    ActiveCell.Offset(2, 0).Select
>> >> >    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
>> >> > SkipBlanks _
>> >> >        :=False, Transpose:=False
>> >> >    Application.ScreenUpdating = True
>> >> >    Application.CutCopyMode = False
>> >> >    Range("A1").Select
>> >> >
>> >
> 


0
dguillett1 (2487)
1/3/2007 5:10:08 PM
Reply:

Similar Artilces:

update a date cell only when worksheet is edited
Hi. is there a function that updates the date cell automatically only when the worksheet is edited or something to that effect. thank you This might help http://www.mcgimpsey.com/excel/timestamp.html Regards Rowan Joe Black wrote: > Hi. is there a function that updates the date cell automatically only when > the worksheet is edited or something to that effect. thank you ...

disable snap-to while dragging tab stops?
How do I drag a tab stop to arbitrary position without it snapping to the tick marks on the ruler? I tried holding down shift, ctrl, alt. None of them works. I even turned off everything in the arrange->snap menu. Publisher 2003. Set the tab to about where you want it, zoom to 200%, open the tab dialog and input the number where you want the tab positioned, click set. The tab button can be dragged to your toolbar by customizing. This is the best that Publisher can do... -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "p...

stops responding
A few days ago while trying to balance one of my accounts, Money would start hanging and I had to kill the process and created a LRD file. My file is only 12MB and it has been fine until recently. I am using Money 2007. I should have put my system specs. I have a P4 3.8GHZ w/ 2GB RAM running XP Pro. When I have Money open, I typically only have Messenger, a browser, and sometimes Acroabat Reader running also. "Casey" wrote: > A few days ago while trying to balance one of my accounts, Money would start > hanging and I had to kill the process and created a LRD file. ...

Macro to create charts
I recently had this question answered very comprehensively. However, I've been told that I need to show my data on a chart in % form. Can anyone help modify the following macro to automatically generate charts where the source data is on a row by row basis with four columns showing data (don't need to show targets on this one). I've tried to modify it myself, but can't seem to get it working. The columns are all next to each other - no gaps. To clarigy, I need Name, %Score1, %Score2, %Score3 & %Score 4. That's it. Regards, JDB Jon Peltier In: microsoft.publ...

how to protect formulas in a cell
Hi everyone. You have cell where values are entered, but it has a formula in it. How can I protect the formula and still let the user enter data in it? Or How do I RESET the table to its orginal state. Say all cells should be set to "o" or "empty" and everything, formulas, formatting for the entire table goes back to when first opened. Please see Pic in attachement (having problems with my server uploading the file). Pls let me know if get to see the pic, I am learning... TIA Enrique +-------------------------------------------------------------------+ |Filename: ...

blue stop screen 0x0000007E
stop error code after windows installs drivers. this is new hdd and mobo but problem persists.oxoooooo7e (oxf748eobf oxf78da2o8,oxf78d9fo8....was doing it with last mobo and hdd...help please!!! -- thanks one and all for your helping hands xerxies wrote: > stop error code after windows installs drivers. this is new hdd and > mobo but problem persists.oxoooooo7e (oxf748eobf > oxf78da2o8,oxf78d9fo8....was doing it with last mobo and hdd...help > please!!! That *is* a driver issue. You are installing the incorrect drivers or need to contact the manufacturer of said ...

recipient policy stopped working
Hello All, I'm seeing an issue in my Exchange 2003 environment where an admin will create a new account and the recipient policy does not populate the users email address. This just started happening a few days ago here in the US... It happened in our UK office last week but I thought that might have been user error on the admin. We are in mixed mode with Exchange5.5, which we have been for almost a year. I did how ever remove some old 5.5 servers but the last one I removed was almost a month ago, so i don't think it would be that. I know you need to ask this question so yes th...

How do I stop a cc email to myself from going to deleted folder
Sometimes when I send an email, I want to keep a copy ofr myself. When I enter my email address in the cc part, this always goes straight to the deleted folder, even though I have my email listed as a safe sender. Any suggestions? On 13/03/2010 01:53, technochallenged wrote: > Sometimes when I send an email, I want to keep a copy ofr myself. Outlook automatically keeps a copy of every email you send in the Sent Items folder. There is no need to cc yourself. "technochallenged" <technochallenged@discussions.microsoft.com> wrote in message news:D4...

Count the Colorindex of a cell with a conditional format
Is there any way (with or without code) to count the number of cells that have a condition that displays a specific colorindex tied to a conditional format? Thanks, Barb Reinhardt Barb, I answered no to this once and Bob Philips corrected me and pointed me towards his page below. You can count conditionally formatted cells but it ain't easy. http://www.xldynamic.com/source/xld.CFConditions.html -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the questio...

is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data?
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? i mean xls not xsl "Daniel" <softwareengineer98037@yahoo.com> wrote in message news:eDjijGEeFHA.2584@tk2msftngp13.phx.gbl... > is it possible to execute write to the fields in another .xsl form a macro > in another .xsl? e.g. some way to load another .xsl into an .xsl macro and > write to its data? > > Both workbooks are open? workbooks("book1.xls").worksheets("sheet1")...

"save as" pop up does not appear when selecting "save as"
Microsoft office 2003 student & teacher windows xp This problem occurred recently after having been using this program for a couple of years. FYI I have already done the following: 1) Control Panel->add/remove prgrms ->microsoft office ->detect & repair, and did a reinstall as well. 2)chkdsk /f /r 3)multiple antivirus scans; antimalware scans 4)Update Windows (xp) ...

3197: The microsoft Jet Database Engine stopped the process because you and another user are attempting to change the same data at the same time
Hello, I have a fairly large (For Access - its slated to be transferred to MySQL) backend that allows the user to use the database's front end normally to store and retrieve data. However when I try to open the database I get the Error "The microsoft Jet Database Engine stopped the process because you and another user are attempting to change the same data at the same time". This isn't true because I have it on my local computer. I've tried importing to a new DB file and I get the same error. The original DB will not open to allow import (show table list) and show er...

About Macros
Hi .. All.. i am a S/W Test Engineer. Actually I have a new job on macros(my bos gave me). I don't know all the functions of macros. I just know that these ar used for Short cut keys (just like automation)... I would like to know 1. What are the additional functions of Macros? 2. How these macros are used in Other Addin like VB Applications.... ? 3. If I have a Excel Template Then How can I use These templates i Macros Programming? 4. How to write code (For macros) to access the data from V Application and produce reports in form of charts ,and reports. Any help/suggestions/arti...

Selecting highlighted data from one column and placing them in another column
Hi, I have data in Column A. Some of the rows in Column A are highlighted in yellow. I would like to copy the highlighted data and paste them into Column B. For Example: Column A 2342 1234 2121 5675 2321 Let's assume that 2342 and 2121 are highlighted. So my resullt in Column B will be: 2342 2121 Keep in mind that I have n numbers of data in Column A. Try this Macro: Sub Colour() Dim bCol As Long Dim x As Long bCol = 2 For x = 2 To 1000 'increase as required If Cells(x, 1).Interior.ColorIndex > 0 Then Cells(bCol, 2) = Cells(x, 1).Va...

Stop all macros
I have a button on a form, which should do different things depending on 1. The data contained within the current record; 2. Whether the current record is a 'new record'; 3. Whether the current record is the first record in the form. On click, an embedded macro is initiated. Each step in the embedded macro has a condition and a corresponding 'RunMacro' action. All the conditions are mutually exclusive, and each sub-macro has a final step of 'StopAllMacros'. So the embedded macro should trigger one, and only one sub-macro. However, it appears that what is act...

formula or macro? whichever, I need help
I have a cell/column with 9-digit social security numbers, no spaces, no dashes. I need the last 4 numbers of each cell copied into a seperate cell/column. I can't find anything about copying partial cell value. Can anyone please help? Thank you, Dagmar Livingston, Columbus, GA =RIGHT(A1,4) -- Kind regards, Niek Otten "daggyfresh" <daggyfresh@discussions.microsoft.com> wrote in message news:AD76AFE1-51CF-426F-A09B-DD8A76696122@microsoft.com... >I have a cell/column with 9-digit social security numbers, no spaces, no > dashes. I need the last 4 numbers of...

Saving Personal Macro Workbook
Recently, my Excel 2003 has started prompting me to Save my Personal Macro Workbook every time I close to Excel--even when I don't add anything to it. In fact, right now, my don't have anything at all in my Personal Macro Workbook. I've checked for any rando code in a Shhet or in the Workbook, and I can't find any. Anybody know how I can stop this from happening? tj Did you recently upgrade from a previous version of excel? Did you copy over your older version of your personal.xls file? If yes, then excel likes to recalculate workbooks saved in older versions of exce...

Macro unexpectedly jumps to other macros and functions
Greetings! I've spent hours trying to figure out why the following subroutine unexpectedly jumps to another subroutine [Sub ToggleButton1_Click()] when it hits the line "Worksheets("Mirrors").ToggleButton1.Value = False" in the macro below. What would automatically trigger this macro to jump into another macro - especially when I have the line "Application.EnableEvents = False" at the beginning of this macro? Also, if I rem out the line "Worksheets("Mirrors").ToggleButton1.Value = False", the macro will instead jump to a user fu...

Macros Error:
I got error message: The macros in this project are disabled. Please refer to the online help or documentation of the host application to determined how to enable macros. (microsoft visual basic) (microsoft outlook 2003). I need your help with this command then tell me to do. Thank you for helping, david Tools | Macro | Security Restart Outlook after you change the setting.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Pow...

Stopping the scroll bar
Hi all, this is my first time. I don't know if this is the right place for this problem but here I go. I have created a template of an invoice the size of an A4 and would like to stop the scroll bar moving both horizantally and vertically in normal view just as if it was in print view. Is that possible through VBA and if yes what is the code that I would need to achieve such task. Thanks in advance --- Message posted from http://www.ExcelForum.com/ Not too sure what you are after but you can remove the scrollbars with <Tools - Options> and then in the View tab, at the bottom,...

PivotTable
Hi, I have a PivotTable with two columns - student names and tuition. I highlighted the **grand total tuition** with fill color. Please note that only ONE cell had this format. However, when I changed the column of student names to a row of student names (by moving the "button"), all the tuition (and not just the grand total) had the fill color. Is this a bug? Is there a way to get around this? I know I can remove the fill color first, change from column to row then put back the fill color. Just wondering if there is a better way. Appreciate advice. Epinn ...

Using a macro question.
Can you execute a macro from inside a formula? IF(A1="Y",execute.macro,"") Thanks Adam, not with a formula, but you can use a worksheet change event like this, put in sheet code Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count > 1 Then Exit Sub If Target.Address = "$A$1" And UCase(Target.Value) = "Y" Then 'put your code here End If End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Usin...

Cell names of merged cells
I have a two columns merged together. I have given each merged cell a name. However, the name appears not only in the name box but also in the cell itself. How do I get it not to show in the cell? How did you name the cells? Insert>Name>Define or Insert>Name>Create? I find an easy way to create multiple cell names is to have a list of names in Column A. Insert>Name>Create>Left Column>OK Now you can delete the data from column A. The created names will remain. Gord Dibben MS Excel MVP On Wed, 14 Apr 2010 14:47:01 -0700, DLB <DLB@discus...

Macro Code
You'd think this would be simple... How do I get a macro to move down 1 cell? I just want a macro to copy the contents of one cell to the cell below it. I have already done this: Sub CopyDown() ' ' CopyDown Macro ' ' Keyboard Shortcut: Ctrl+d ' Selection.Copy Range("A122").Select ActiveSheet.Paste End Sub I want the A122 to be the cell below where the cursor happens to be when I kick off the macro. Any help would be appreciated. Amy Got it from the last thread... thanks! "cvgairport" wrote: > Yo...

Data validation master cell
Is it possible to change what list is in a cell by selecting the name o that list from a "master" cell? For instance, say the master cell is A1, and it's validation lis contains the list "cats, dogs, horses". The list in B1 would be based on what list is selected in A1. Fo instance, if A1 was set to "cats", then the choices in B1 would b something like, "Calico, Tomcat, housecat, Siamese". What I really want to do though, is only have one "master" cell an have dependent cells that change depending on the master. So, if A1 is the master,...