+ Reply to Thread
Results 1 to 5 of 5

Find, count down 4, and display the value of a cell

  1. #1
    Registered User
    Join Date
    04-20-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Find, count down 4, and display the value of a cell

    I have a worksheet (web data) that pulls information from the web. The only thing on this page is the web data. Some times the site I pull from changes formats and it messes up a few formulas I have. On another worksheet (data) that does a few different things. In a nutshell the "data" sheet looks to the "web data" sheet for 12 values and pulls them over. Once these 12 values are on "data" they are used for caluclations in another worksheet "report". I need a function or a macro that looks at "web data" and finds a static cell name 6:00 AM, counts down 4 cells, and gives me the value of that cell. 4 cells below "6:00 AM" is a dynamic value. I had it all working well for awhile when "6:00 AM" was a static value, in a static cell location but now that the value is static and the locations varies i cant figure it out. Any ideas how to accomplish this?

  2. #2
    Registered User
    Join Date
    04-20-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Find, count down 4, and display the value of a cell

    Test Bellville Daily Safety Report.xlsxTest Bellville Daily Safety Report.xlsx

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Find, count down 4, and display the value of a cell

    Use this

    =INDEX(A:A,MATCH(0.25,A:A,0)+4)

  4. #4
    Registered User
    Join Date
    04-20-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Find, count down 4, and display the value of a cell

    It worked! Thank you so much! Question 2 lol. Can I make the sheet refresh upon opening? and is there anyway to make it save to pdf with out prompting for a file name? I am trying to automate a report and run it on the server. With windows task scheduler I can now automate sending it out, I just need to complete automate the report so it can run itself.

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Find, count down 4, and display the value of a cell

    You can use a Workbook Open event macro for the web query refresh. VBA is out of my comfort zone, though, so I'll let a VBA expert give you advice on that.
    Or, you can record a macro while you manually refresh the query. Stop the recorder and check the macro. Then place the recorded code into the Workbook Open routine. See here for info on that: http://www.ozgrid.com/VBA/auto-run-macros.htm
    Note: I would turn off "Enable background refresh" in the query properties.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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