+ Reply to Thread
Results 1 to 5 of 5

macro to be modified

Hybrid View

  1. #1
    Registered User
    Join Date
    06-02-2014
    Posts
    88

    macro to be modified

    Hi All,

    With google I developed something that forks for individual cell:
    Sub PullValue()
    Dim PATH, FILENAME, SHEETNAME, CELL

    PATH = "J:\ISO\01_ISO\07_Audity wewnętrzne\2015\Karty niezgodności\"
    FILENAME = Range("M5")
    SHEETNAME = "DCT_ISOFOR_SC_9.02_2015"
    CELL = "I8"

    With Range("C5")
    .Formula = "='" & PATH & "[" & FILENAME & "]" & SHEETNAME & "'!" & CELL & ""
    .Value = .Value
    End With

    End Sub


    I have unsuccessfully tried to develop macro that works dynamically for all column, so what I wish:
    Sub PullValue()
    Dim PATH, FILENAME, SHEETNAME, CELL

    PATH = "J:\ISO\01_ISO\07_Audity wewnętrzne\2015\Karty niezgodności\"
    FILENAME = Range("M5")
    SHEETNAME = "DCT_ISOFOR_SC_9.02_2015"
    CELL = "I8"

    With Range("C5")
    .Formula = "='" & PATH & "[" & FILENAME'(M5:M204 switched for relevant range C5:C204) & "]" & SHEETNAME & "'!" & CELL & ""
    .Value = .Value
    End With

    End Sub


    So the only dynamic should be FILENAME.
    Could you please to provide me with modified macro/support?


    Regards,
    Marcin

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: macro to be modified

    Do you want to loop through, whats going on, your post isnt very clear.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    06-02-2014
    Posts
    88

    Re: macro to be modified

    All began with formulas.
    There is the story


    Regards,
    Marcin

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: macro to be modified

    Sorry you'll have to explain what you want to do if you need help.

    Can you just expain what you want to do?

  5. #5
    Registered User
    Join Date
    06-02-2014
    Posts
    88

    Re: macro to be modified

    Quote Originally Posted by Marcin4111 View Post
    Dim PATH, FILENAME, SHEETNAME, CELL

    PATH = "J:\ISO\01_ISO\07_Audity wewnętrzne\2015\Karty niezgodności\"
    FILENAME = Range("M5")
    SHEETNAME = "DCT_ISOFOR_SC_9.02_2015"
    CELL = "I8"

    With Range("C5")
    .Formula = "='" & PATH & "[" & FILENAME & "]" & SHEETNAME & "'!" & CELL & ""
    .Value = .Value
    End With

    End Sub
    There are 4 factors required for simulation:
    PATH - static
    FILENAME - dynamic required
    SHEET - static
    CELL - static

    Dynamic values for FILENAME are defined in Range("M5:M204")

    Formula should cover Range("C5:C204")
    .Formula = "='" & PATH & "[" & FILENAME 'dynamic values & "]" & SHEETNAME & "'!" & CELL & ""


    I hope you understand my intentions.


    Regards,
    Marcin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Date Modified Formula/Macro?
    By shootingstarz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2012, 04:05 PM
  2. Macro to run whenever any cell in the spreadsheet is modified
    By theoldebrewer in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-21-2012, 03:21 PM
  3. Modified transpose function OR macro?
    By froffel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-14-2009, 11:20 AM
  4. Run/save Modified CSV output macro
    By TENNISMAN in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2009, 07:33 AM
  5. Date last modified macro
    By Leon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2005, 06:25 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1