Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Macro Button needed for this function

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks to those who take a look at this and help!

    Suppose the file consists of 2 worksheets

    For the both sheets:
    Cell A1 have date: 25-Mar-02

    Can I have a Macro button so that it inputs (when pressed) this formula into Cell C1 (BOTH Sheets): =C:test[Valuation 25-Mar-02.xls]Ingenium'!$E$11

    Note: the date within the file name corresponds to the date in Cell A1 for both sheet.

    Suppose both sheet's Column A has already been filled with date. The next step I wish the macro to do is whenever I press the button it will fill the formula mention above into C2 (for both sheets). I must ensure Cell C2 formula (in both sheets)have the file name with the date correspond to their sheet's Cell A2's date.

    when I press the button it will do the same to cell C3 with both formula reading the dates in cell A3 (for both sheets)

    As I am very new to macro Please asist step by step of how to create a macro button and where to put the VB code...

    Many Many Many thanks to the helper,,,
    Deeply appreciated




    [ This Message was edited by: chaju on 2002-03-27 00:03 ]

    [ This Message was edited by: chaju on 2002-03-27 01:45 ]

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Any one can help me with this??

    Thanks for you attention

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi chaju
    I do not understand exactly waht it is you are trying to do?
    Please repost with more details...
    Thanks
    Tom


  4. #4
    Board Regular
    Join Date
    Mar 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have edit the content of the problem.. see if you can understand it this time.. thanks

  5. #5
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry, I
    still do not understand.
    Why not just copy and paste doen column C?
    I hope someone else can help you.
    Tom

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Location
    Guderup, Denmark
    Posts
    288
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Run this macro when stading in the cell with the date. The cell next to it will then reference to the actual valuationworkbook

    Sub test100()
    Dim sBook, sFilePath As String
    sBook = "[Valuation " & ActiveCell.Text & ".xls]Ingenium'!$E$11"
    sFilePath = "C:test"
    ActiveCell.Offset(0, 1).Value = "='" & sFilePath & sBook
    End Sub

    Regards Tommy

  7. #7
    Board Regular
    Join Date
    Feb 2002
    Location
    Guderup, Denmark
    Posts
    288
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi
    Disregard my last post. I did post a temporary sub.
    This one, I hope, will do what you ask for.

    Sub test101()
    Dim sBook, sFilePath As String
    R = ActiveCell.Row
    sBook = "[Valuation " & Cells(R, 1).Value & ".xls]Ingenium'!$E$11"
    sFilePath = "C:test"
    Sheets(1).Cells(R, 3).Formula = "='" & sFilePath & sBook
    Sheets(2).Cells(R, 3).Formula = "='" & sFilePath & sBook
    ActiveCell.Offset(1, 0).Select
    End Sub

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •