Geek or Nerd?

Let’s be honest, you wouldn’t be on this forum if you weren’t one or the other.

Well now you can identify the difference - and in the form of a Venn diagram. Everybody loves a Venn diagram.

9 Likes

Nice diagrams

1 Like

Surely only geeks like Venn diagrams.

Or is it nerds.

1 Like

I’m just pleased not to be in the dork or stalker zones :rofl:

1 Like

Probably a better thread to ask this, but couldn’t find it.

What’s the best way for me to partly automate some document writing?

At work we currently have to produce health screening reports. These are personalised, eg. someone with high cholesterol will get advice A, someone with normal cholesterol will get advice B, and so on.

What I’d really like to be able to do is enter the cholesterol level (for example) and then depending on the level, the report automatically include certain text.

Would VisualBasic allow us to do this in MS Word? I’m willing to try to learn, or is this barking up the wrong tree? Is there a better way?

Thanks geeks (or nerds)

I’ve done this kind of thing a few times but in a very low tech way, for high volume responses in a contact centre type environment.

My experience is that it’s only worth being clever if you can be 100% sure you’ll always want exactly the same text. In reality, I suspect there might be tweaks depending on age, gender, maybe other factors too?

If so, then using pre-prepared text blocks that you can cut and paste gets you most of the way there, you just finesse the text at the end.

2 Likes

You must be able to this with Excel & Word. I don’t know how but I’ve seen examples of it on Youtube vids demonstrating other Excel functions.

1 Like
1 Like

Might be worth looking at things like Microsoft powerautomate or power apps, issue might be that the free version is fairly limited.

They’re low code language automation tools

Plenty of guides online usually.

2 Likes

Just to add, I see a lot of instances where businesses want to automate things. As with a lot of improvement work, leadership teams often think they can automate everything, get rid of half the staff and life will then be much easier. :roll_eyes:

The reality is that automation is only really worthwhile for high volume work and you need someone to keep the automation working - the latter is something very few people consider until it bites them.

Automation may stop working in a number of ways, a couple of examples being:
Change the format of the data
Change the number of data fields
Additional data or reporting

Basically, it isn’t the straightforward option that first appearances might suggest; hence why a lower tech solution might be more effective. :slight_smile:

3 Likes

E.g 10 years go by and Microsoft choose to mess things up. We had a bunch of sophisticated ‘90s financial models in Excel that were heavily relied upon. Lots of custom functions and VBA automation. Then along comes Office 2015 ish and bang they stopped working. IT were never able to solve it. We had to run old laptops with old office until we could rebuild everything from blank worksheets.

So one can never rely on Office. (This was my TED talk thanks for coming.)

5 Likes

Having worked on healthcare systems and patient information, and watched it go wrong, I wouldn’t do this in end user computing (desk top apps). I’d have the key health applications create the emails, and apply the logic you are talking about in code.

3 Likes

Thanks for all the tips above, I have taken them on board and tried to keep things simple.

What I have come up with is an Excel sheet which acts as a form, and populates sentences of text on a second (hidden) sheet based on the inputs.

Now what I want to do is add a button to the first sheet which fills a Word template, with this text that has been generated. The end result will be a Word document which can be proof-read and adjusted if needed, but the donkey work will have been done.

This feels like maybe where VisualBasic might come in - is this right? Anyone know how to do it & can point me in the right direction??

2 Likes

A simple way I’ve used in the past, albeit not a slick as some of the other guys might do it would be, if you add the Macro toolbar you can just record a Macro by carrying out what you want to do, copying and pasting the text into a blank Word document, then assign that macro to a shape in your spreadsheet which will then become a button…

1 Like

Great plan - thanks :+1:

You can also use Pylon in Excel now if that helps.

1 Like

looked into python in excel but looks it’s still being rolled out, you may have to sign up for some special Microsoft thing

but it was a really quiet day at work, literally about one tenth of the normal work of a UK day so I had a play around & made some good progress.

have made a menu page on a sheet in Excel. This populates a hidden sheet, with actual text based on those inputs.

Then a VBA macro that opens a template Word Document and adds to it.

I have never used VBA before, it’s one weird language, but remembered @Poet 's tip and kept asking chatGPT to do the donkey work :ok_hand:

still a way to go, but it’s taking shape

hope the real benefit will be when it comes to pulling in the blood results & then firing off set paragraphs like “drink less beer”, although thinking about it probably not that :thinking:

5 Likes

Do you not have the database thing over there which does this for you?

Seems like a gap in the market :joy:

I started off with Excel data entry, then moved to automating that with VBA, then put it all in SQL server with a snazzy front end.
Moved from that to SAS, dabbled with Oracle, done a bit of Unix/Linux bash scripting along the way, a bit of Powershell.
Now moving loads of legacy code to Python, for the migration to “Cloud”.

Anyways … VBA … at the start…

Application.ScreenUpdating = False

Then make it True at the end.
Get a MsgBox popping up with “Done”

Sorted :white_check_mark:

Glad you’re having fun.
If you ever want a career change, you’re a shoe in for this stuff.

RE: Excel drop down lists.
You can get all of them in a UserForm in VBA.
Create a whole front end with it.
Tabbed for each thing.
Get them all married up to the CCSD codes (is that a thing over there?)
Use early binding, late binding I hate :joy:

2 Likes

The chatgpt route is a good move. Reminded me of this Tom Scott video https://youtu.be/jPhJbKBuNnA

@Cobbie at work we get a lot of feature requests that started with Automatic!

3 Likes

sounds like there is some good advice in there, unfortunately it’s way over my head

I have got way to too deep into this project, it’s chewing up more hours than it will ever possibly save. although it’s all good rest for knee & nowt wrong with letting VO2max drop to single digits once in a while :see_no_evil:

anyway, I was wrong about python. @doka suggested it, and yep absolutely can manipulate .xls with python, just need to import a module like xlwings.

docx for word and pypdf2 for scraping pdf files from the lab (searches for them in outlook inbox)

Irs actually working!

the only thing I’m stuck on, and I think it probably is to do with what @poet wrote above, is what sort of data table or app is best for entering editing and storing the conditional text

eg. if BMI>30 text = "eat less pies blah blah’
if BMI < 18 text = “get some pies down you etc etc”
else: “well done David”+michelangelo2.jpg

I want to be able to adjust and add to these template text boxes. Excel is nice for indexing them, but not great for editing the text which can run to 2 or 3 paragraphs and contain bullet points etc. Word tables are nice for editing, but not easy to reference the table rows and columns . Is there something else?

2 Likes