# Calculating delta numbers from an excel spreadsheet

Page 1 of 1

## 1 Replies - 216 Views - Last Post: 01 July 2019 - 09:24 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=416661&amp;s=42a5e12eb6bc89bcf8565881e9046540&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 yellowcab

Reputation: 1
• Posts: 14
• Joined: 25-June 19

# Calculating delta numbers from an excel spreadsheet

Posted 01 July 2019 - 01:05 AM

I want to calculate delta numbers from an excel spreadsheet. Right now I can calculate delta numbers only for one row. I want to automate the process of calculating delta numbers.
Here's my code:

```import os
os.chdir("/Users/user/Desktop")

import openpyxl
sheet = wb.active

def delta():
a = sheet['A2'].value
b = sheet['B2'].value - sheet['A2'].value
c = sheet['C2'].value - sheet['B2'].value
d = sheet['D2'].value - sheet['C2'].value
e = sheet['E2'].value - sheet['D2'].value
f = sheet['F2'].value - sheet['E2'].value
return [a, b, c, d, e, f]

delt = delta()
delt.sort()

if delt[-1] < 16:
print("The delta numbers are: " + str(delt))
else:
print("These are not delta numbers.")
```

http://ge.tt/3lZEnrw2

Is This A Good Question/Topic? 0

## Replies To: Calculating delta numbers from an excel spreadsheet

### #2 yellowcab

Reputation: 1
• Posts: 14
• Joined: 25-June 19

## Re: Calculating delta numbers from an excel spreadsheet

Posted 01 July 2019 - 09:24 AM

This was solved on stackoverflow.com.