PC Review


Reply
Thread Tools Rate Thread

I am using a macro and it cancels my formula

 
 
Nelly
Guest
Posts: n/a
 
      6th Sep 2009
Hi

I am trying to automate my daily spreadsheet.

In col A I have a formula that looks at a table on a different sheet and
returns the value that matches Col C.
I have a macro that copies Col F and pastes it into Col C position then
proceeds to split text into columns. As soon as I run the macro it cancels
out the formula because Col C is being recreated. I tried creating another
column that equalled column C but even that formula cancelled out and gave a
#REF! in the formula instead of C:C.

Any ideas on what I can do to stop it cancelling it out please?

Thx
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      6th Sep 2009
If desired, send your file to my address below along with this msg and
a clear explanation of what you want and before/after examples.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Nelly" <(E-Mail Removed)> wrote in message
news:19BC6C32-D18E-4034-B55C-(E-Mail Removed)...
> Hi
>
> I am trying to automate my daily spreadsheet.
>
> In col A I have a formula that looks at a table on a different sheet and
> returns the value that matches Col C.
> I have a macro that copies Col F and pastes it into Col C position then
> proceeds to split text into columns. As soon as I run the macro it
> cancels
> out the formula because Col C is being recreated. I tried creating
> another
> column that equalled column C but even that formula cancelled out and gave
> a
> #REF! in the formula instead of C:C.
>
> Any ideas on what I can do to stop it cancelling it out please?
>
> Thx


 
Reply With Quote
 
Nelly
Guest
Posts: n/a
 
      6th Sep 2009
Thanks Don, I have emailed it to you. Hopefully I have provided enough info?

Thx
Nelly

"Don Guillett" wrote:

> If desired, send your file to my address below along with this msg and
> a clear explanation of what you want and before/after examples.
>
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "Nelly" <(E-Mail Removed)> wrote in message
> news:19BC6C32-D18E-4034-B55C-(E-Mail Removed)...
> > Hi
> >
> > I am trying to automate my daily spreadsheet.
> >
> > In col A I have a formula that looks at a table on a different sheet and
> > returns the value that matches Col C.
> > I have a macro that copies Col F and pastes it into Col C position then
> > proceeds to split text into columns. As soon as I run the macro it
> > cancels
> > out the formula because Col C is being recreated. I tried creating
> > another
> > column that equalled column C but even that formula cancelled out and gave
> > a
> > #REF! in the formula instead of C:C.
> >
> > Any ideas on what I can do to stop it cancelling it out please?
> >
> > Thx

>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      6th Sep 2009
Your original formula should have been
=VLOOKUP(b4,Sheet4!$A$1:$B$13,2,0)
your macro should be
Sub cutcolEtoColB()
Columns("E").Cut
Columns("b").Insert
End Sub

formula now
=VLOOKUP(c4,Sheet4!$A$1:$B$13,2,0)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Nelly" <(E-Mail Removed)> wrote in message
news:2DEAA119-6E41-4A04-A25B-(E-Mail Removed)...
> Thanks Don, I have emailed it to you. Hopefully I have provided enough
> info?
>
> Thx
> Nelly
>
> "Don Guillett" wrote:
>
>> If desired, send your file to my address below along with this msg
>> and
>> a clear explanation of what you want and before/after examples.
>>
>>
>> --
>> Don Guillett
>> Microsoft MVP Excel
>> SalesAid Software
>> (E-Mail Removed)
>> "Nelly" <(E-Mail Removed)> wrote in message
>> news:19BC6C32-D18E-4034-B55C-(E-Mail Removed)...
>> > Hi
>> >
>> > I am trying to automate my daily spreadsheet.
>> >
>> > In col A I have a formula that looks at a table on a different sheet
>> > and
>> > returns the value that matches Col C.
>> > I have a macro that copies Col F and pastes it into Col C position then
>> > proceeds to split text into columns. As soon as I run the macro it
>> > cancels
>> > out the formula because Col C is being recreated. I tried creating
>> > another
>> > column that equalled column C but even that formula cancelled out and
>> > gave
>> > a
>> > #REF! in the formula instead of C:C.
>> >
>> > Any ideas on what I can do to stop it cancelling it out please?
>> >
>> > Thx

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing Macro Cancels CutCopyMode Mitch Powell Microsoft Excel Programming 1 16th Sep 2009 10:27 AM
formula or macro to change a formula in muliple spreadsheets mel.pilgrim@agr.gc.ca Microsoft Excel Programming 1 21st May 2009 05:27 PM
BA Cancels All Flights christopherpostill General Discussion 3 18th Aug 2006 11:04 AM
Formula expected end of statement error, typing formula into cell as part of VBA macro DavidGMullins@gmail.com Microsoft Excel Programming 1 20th Jul 2006 07:58 PM
DVD cancels Screensaver =?Utf-8?B?YmlsbA==?= Windows XP General 3 7th Oct 2005 07:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 AM.