Henderson Petrophysics services include quicklook and detailed wireline log analysis, Wellsite geology,
Petrophysics field studies, Thin and laminated reservoirs, Low Resistivity Low Contrast reservoirs,
Tight/fractured reservoirs, Source rock analysis, Hydrocarbon reserves estimation and audit,
Petrophysics database development and maintenance, Advice for new ventures and contract negotiations

Henderson Logo Petrophysics


Using EXCEL with Visual Basic for Applications
to Create Zoned Petrophysics Crossplots (Scatterplots)


Introduction

Henderson Petrophysics has developed Visual Basic for Applications (VBA) macros to create zoned Petrophysics crossplots from Petrophysics data stored in Microsoft EXCEL.

Figure 1 shows an interesting example of a zoned crossplot that very clearly shows the changes in Potassium and Thorium content from zone to zone. Colours and symbols are used to differentiate the zones. Using this figure you could quite easily design criteria to use the Thorium and Potassium log data to identify geological zonation.

Example Zoned Crossplot
Figure 1: Example of a zoned Crossplot using Spectral Gamma Ray log data


Example Zoned Crossplot
Figure 2: Zoned Crossplot With Zone Identification Criteria

Figure 2 shows some criteria that could do a good job to determine the geological zonation.

The zone "Subcrop" can be defined by the conditions;
   Thor > 13 AND Pota > 2.3

The ratio Potassium:Thorium ("KThRatio" calculated in EXCEL) can be used to differentiate the "Lower X" zone from the "Upper X" and "Middle X" zones.

The "Lower X" zone can be defined by the conditions;
   KThRatio < 0.234 AND Pota <= 2.3

Some of the "Upper X" zone data can be confidently defined by the conditions;
   KThRatio >= 0.234 AND Pota > 2.0 AND Thor < 13

Most of the "Upper X" and "Middle X" data cannot be separated with confidence, but the following conditions can be used as a partial definition;
   KThRatio >= 0.234 AND Pota < 2.0 AND Thor < 13

The following Visual Basic macro code fragment does a good job of using the Thorium and Potassium log data to identify the geological zones;

Sub ZoneDetermination()

KThRatio = Pota / Thor
Zone = "Unknown"

If (Thor > 13 And Pota > 2.3) Then
    Zone = "Subcrop"
    GoTo ZoneIDOK
End If

If (KThRatio < 0.234 And Pota <= 2.3) Then
    Zone = "Lower X"
    GoTo ZoneIDOK
End If

If (KThRatio >= 0.234) Then
    If (Pota > 2.0) Then
        Zone = "Upper X"
        GoTo ZoneIDOK
    Else
        Zone = "Upper or Middle X"
    End If
End If

ZoneIDOK:
End Sub

Software for Creating Zoned Petrophysical Crossplots

You can get a free copy of an example EXCEL Spreadsheet with Spectral Gamma Ray (NGT) data and VBA Macros to create zoned crossplots.

The Henderson Petrophysics Free Downloads section contains an example EXCEL Spreadsheet, a Visual Basic Macro file and associated documentation for processing petrophysics data to create zoned crossplots.

The EXCEL Spreadsheet contains Visual Basic for Applications Macros that activate the analysis modules and process data. This Spreadsheet is intented only for advanced EXCEL users who are familiar with using Visual Basic macros. Please look at the ReadMeFirst text file before attempting to open the Spreadsheet. This file discusses issues arising from the use of Spreadsheets with embedded Macros.



The Zoned Crossplot User Interface

Figure 3 shows the User Interface used to input parameters used to create the Zoned Crossplots.

Zoned Crossplot User Interface
Figure 3: User Interface for Zoned Crossplot Spreadsheet

Figure 4 shows part of the data set used in the example Spreadsheet. The log data is in columns with the first row containing the curve name. The data must start in row 2 and there cannot be any blank rows in the data set.

You can use any data as a reference column, but the VB macros look for a reference curve called either "DEPTH" or "DEPT". If necessary, rename your reference column or create a copy and call it "DEPTH".

Example Data Sheet
Figure 4: Example Petrophysics Data Sheet


Example Zoned Depth Plot
Figure 5: Example of a Zoned Crossplot with Depth as the Y-axis

Figure 5 shows an example zoned crossplot with depth as the Y-axis variable. In this example you can see the depth profile of Thorium values.


Working With Macros in EXCEL

The examle EXCEL Spreadsheet available from our Download sectin contains Visual Basic for Applications Macros that activate the analysis modules and process data. This Spreadsheet is intented only for advanced EXCEL users who are familiar with using Visual Basic macros. Please look at the ReadMeFirst text file before attempting to open the Spreadsheet. This file discusses issues arising from the use of Spreadsheets with embedded macros.

Figure 6 shows the warning window displayed by EXCEL when you open a Spreadsheet containing macros. We suggest that you open the Spreadsheet "Zoned_CrossPlot_test.xls" with the macros disabled. To examine the macros type Alt+F11 to open the Visual Basic editor. After convincing yourself that the macros are not harmful to your computer system you can re-open the Spreadsheet with the macros enabled. Alternatively, you can use our macros as a learning resource for developing your own petrophysics macros.

EXCEL warning when opening a Spreadsheet containing macros
Figure 6: EXCEL Warning window when opening a Spreasheet containing macros



 

How to Contact Us

In additional to informative articles and useful downloads, our Website contains a lot of information on the services and expertise offered by Henderson Petrophysics.

Henderson Petrophysics Home Page

Henderson Petrophysics offers specialised formation evaluation services to the upstream oil and gas business.

For more information on our services or our fee schedule you can send an e-mail (click on the icon below) or contact us using the following information;


Phone:    +61 7 3300 3980  (61 is the country code for Australia and 7 is the area code for Brisbane)
Fax:        +61 7 3300 9342
Mobile:    +61 407 653342
E-mail:    don@hendersonpetrophysics.com