Simple Question: How to locate the last populated cell in a column of a PlanMaker worksheet?

Post Reply
ozboomer
Posts: 1
Joined: Sat Dec 09, 2023 4:25 am

Simple Question: How to locate the last populated cell in a column of a PlanMaker worksheet?

Post by ozboomer »

Hi, all... another newbie here (in BasicMaker, anyway)... and I haven't done any VBA-style things in a spreadsheet since the 1990s or something(!)

So, a bit of a simplistic question:

I have a worksheet that has a title row and then some populated rows. I simply want to find the last non-empty row in a specific column. Consider:

Code: Select all

n = pm.ActiveSheet.Columns(3).Rows.Count
...is no good as it just returns the dimension of the worksheet (1,048,576 rows).

Short of iterating through each row, examining each cell, is there any function/builtin that will return the last populated cell within a column? ...or even the first non-populated cell? I've tried hitting the manual... but it's sort of like working through seaweed... and I haven't been able to find a relevant example there.

I'm simply trying to build a script to apply a display attribute to an entire row based on a value in the row in a certain column. The 'sensible' thing to do would be to use Conditional Formatting... but I've literally spent days trying to get that to work when rows are inserted or appended to the existing rows of data and everything goes haywire.. hence this foray into BasicMaker. Ultimately, it'll be quicker to get the job done this way than to spend more time trying to get 'me of little brain' to come to grips with Conditional Formatting... and it'll be useful to know about anyway.

Although I've used VBA-like tools (SaxBasic, WinWrapBasic, etc) in a number of applications, I'm still trying to learn the extent of the Object Model here... and how it works.

I'm using PlanMaker 2021 (rev S1068.1105) and BasicMaker Professional 2021 (rev S1068.1105) , both 32-bit, under Windows 8.1 32-bit.

Thanks a heap.
SuperTech
SoftMaker Team
SoftMaker Team
Posts: 2951
Joined: Wed Mar 11, 2020 5:31 pm

Re: Simple Question: How to locate the last populated cell in a column of a PlanMaker worksheet?

Post by SuperTech »

Thank you for your post, but currently this is not available in BasicMaker. I have forwarded this improvement suggestion.
Post Reply

Return to “BasicMaker 2021 for Windows”