I tried to understand your algorithm without testings. From your code, you calculate for the value > 1 only second path, an for value=1 both paths. Maybe, this is what you look for:

```
tell application "Microsoft Excel"
activate
tell (used range of active sheet) to set {UsedRows, UsedColumns} to {count rows, count columns}
set hidden of (entire column of (range "B:C,G:G,K:M,O:R,T:T,V:V,Y:Z,AB:AJ")) to true
set {NoStock, ProductExpDay, DaystoExp, FundsInvested, WResultExp, StockYieldExp, StockCount} to {0, 0, 0, 0, 0, 0, 0}
repeat with Rn from 3 to UsedRows
set theValue to value of cell ("S" & Rn)
if theValue ≥ 1 then set hidden of row (Rn) to true
if theValue = 1 then set {NoStock, ProductExpDay, DaystoExp, FundsInvested, WResultExp, StockYieldExp, StockCount} to my calc(Rn, NoStock, ProductExpDay, DaystoExp, FundsInvested, WResultExp, StockYieldExp, StockCount)
if theValue ≥ 1 then set {NoStock, ProductExpDay, DaystoExp, FundsInvested, WResultExp, StockYieldExp, StockCount} to my calc(Rn, NoStock, ProductExpDay, DaystoExp, FundsInvested, WResultExp, StockYieldExp, StockCount)
end repeat
set hidden of column ("1:" & UsedColumns) to false
end tell
on calc(Rn, NoStock, ProductExpDay, DaystoExp, FundsInvested, WResultExp, StockYieldExp, StockCount)
tell application "Microsoft Excel"
set cellHvalue to value of cell ("H" & Rn)
set cellIvalue to value of cell ("I" & Rn)
set cellGvalue to value of cell ("G" & Rn)
set cellAKvalue to value of cell ("AK" & Rn)
set cellNvalue to value of cell ("N" & Rn)
set cellJvalue to value of cell ("J" & Rn)
end tell
set NoStock to ((10000 / cellHvalue) div 100) * 100
set ProductExpDay to ProductExpDay + cellHvalue * ((cellIvalue - cellAKvalue) / 86400) * NoStock
set DaystoExp to DaystoExp + (cellIvalue - cellAKvalue) / 86400
set FundsInvested to FundsInvested + cellHvalue - (cellNvalue + cellGvalue) * NoStock
set WResultExp to WResultExp + ((cellJvalue + cellGvalue + cellNvalue) - cellHvalue) * NoStock --At Expiry
set StockYieldExp to ((WResultExp / (ProductExpDay / 365) / 100)) * 100
set StockCount to StockCount + 1
return {NoStock, ProductExpDay, DaystoExp, FundsInvested, WResultExp, StockYieldExp, StockCount}
end calc
```