I suggest you think about the possibility that "Portf" is never found.
Here's a re-work of your code:
function Historia() {
Utilities.sleep(15000);
var ss= SpreadsheetApp.setActiveSheet(XXX);
var rows = ss.getDataRange();
var values = rows.getValues();
var aktPort = "";
for (var i=0;i<values.length; i++) {
var j = values[i].indexOf("Portf" );
if (j > -1) {
aktPort = values[i][j+1];
var ss= SpreadsheetApp.setActiveSheet(Hist);
ss.getRange(4,2).setValue(aktPort); // since there's only one storage location
break; // no need to look further
}
}
}