Hi, I've no knowledge of Fortran but am researching its (theoretical) use to perform a 'cross- referencing' function on data in a four column array of one million rows. The program matches data in column A to Column D by referencing the matching values in columns B and C.(adsbygoogle = window.adsbygoogle || []).push({});

Here's the program I'm using - could anyone convert this to Fortran and could this in, in practice, run on Fujitsu's K (10 teraflops) computer. If so, how long would it take the K to perform this task - I've calculated 12.93 hrs from tests on a typical office PC? With thanks.

Sub AddCodes()

Dim x As Long, LastRow As Long, UB As Long, BList As Variant

Const StartRow As Long = 1

LastRow = Cells(Rows.Count, "A").End(xlUp).Row

BList = Join(WorksheetFunction.Transpose(Cells(StartRow, "B").Resize(LastRow - StartRow + 1)), "/")

' Application.ScreenUpdating = False

For x = StartRow To LastRow

UB = UBound(Split(Split(BList, Cells(x, "C").Value)(0), "/"))

If UB >= 0 Then

With Cells(x, "D")

.Value = .Value & "," & Range("A1").Offset(UB).Value

If Left(.Value, 1) = "," Then .Value = Mid(.Value, 2)

.Interior.ColorIndex = 6

.Font.Bold = True

End With

End If

Next

Application.ScreenUpdating = True

End With

End Sub

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Converting VBA to Fortran

Loading...

Similar Threads - Converting Fortran | Date |
---|---|

Converting a DFA to efficient code? | Mar 11, 2018 |

Help: Convert Matlab to Python code | Dec 8, 2017 |

Need to convert .f90 file to pdf | Jan 27, 2017 |

Converting integer data to string in fortran 90 | Mar 13, 2012 |

Converting equations to Fortran code | Aug 7, 2011 |

**Physics Forums - The Fusion of Science and Community**