Birthday Excel to GUI Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
nik_the_giant
Posts: 62
Joined: 01 May 2022, 03:26

Re: Birthday Excel to GUI

Post by nik_the_giant » 18 May 2022, 12:25

Okay, I'll try that and hope I use it correctly :shifty:

nik_the_giant
Posts: 62
Joined: 01 May 2022, 03:26

Re: Birthday Excel to GUI

Post by nik_the_giant » 18 May 2022, 12:38

This code shows me only 2 dates with "05" not all...
flyingDman wrote:
18 May 2022, 11:30
You already had the technique to find first and last date from @mikeyww's script above. You have to put the elements together:

Code: Select all

xl := ComObjActive("excel.application")
for c in xl.activesheet.usedrange.columns(3).cells
	{
	part := strsplit(c.text,".")
	if (part.2 = "05")
		{
		date := part.3 part.2 part.1
		(date < first || !first) && (first := date, res1 := c.offset(0,-2).text " " c.offset(0,-1).text " " c.text)
		(date > last           ) && (last  := date, res2 := c.offset(0,-2).text " " c.offset(0,-1).text " " c.text)
		}
	}
msgbox % res1 "`n`n" res2

User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: Birthday Excel to GUI

Post by flyingDman » 18 May 2022, 13:24

You said you wanted "Only the first and the last"/ Please be detailed. In addition, you have all the elements to try yourself. Please show some initiative!.
14.3 & 1.3.7

nik_the_giant
Posts: 62
Joined: 01 May 2022, 03:26

Re: Birthday Excel to GUI

Post by nik_the_giant » 18 May 2022, 13:31

Yes, but these are the last two not the first and last,
that's why I don't understand it
flyingDman wrote:
18 May 2022, 13:24
You said you wanted "Only the first and the last"/ Please be detailed. In addition, you have all the elements to try yourself. Please show some initiative!.
Here is the Excel and i think it's because the year isn't it?


EDIT// i changed the excel a little bit and it worked

User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: Birthday Excel to GUI

Post by flyingDman » 18 May 2022, 14:18

Yes, we look at part.3 part.2 part.1. So because it tests for "05" you would only need to test for the day (= part.1)
14.3 & 1.3.7

Post Reply

Return to “Ask for Help (v1)”