LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Formula

Thanks for your help with my last prob Frank....

The below code should check if there is a formula in range
b2 on sheet email and if it doesnt fill range b2:d125 with
formulas. NB I have ommited formula as they are rather
long and make code unclear.

This code works if I have worksheet Emails open but I
would like to run this code from another sheet. I
previously used worksheets("email").select but I do not
want the user to see this sheet.

Does anyone know why the with worksheets("email") is not
working?

Sub Add_Email_Formulas()

If Worksheets("Email").Range("B2").HasFormula Then
End
Else

With Worksheets("Email")
Range("B2").Formula = "FORMULA"
Range("C2").Formula = "FORMULA"
Range("D2").Formula = "FORMULA"
Range("B2:D2").AutoFill Destination:=Range("B2:D125")
End With
End If

End Sub

 
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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 03:36 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"