Translate


Featured post

Working with two monitors

Working with two monitors is realy great. There are keyboard shortcuts in Windows 7 that make the work with them much easier and faster ...

Showing posts with label How To. Show all posts
Showing posts with label How To. Show all posts

2017-03-25

VBA - how to paste array formula to Table column

If you are working with a Table (ListObject) manually, you can use an array formula. Simply past your formula with CTRL+SHIFT+ENTER. There is no problem and it works perfectly. But if you try paste the same array formula via VBA, you'll get this error: Run-time error '1004': Unable to set the FormulaArray property of the range class.

2016-09-04

Realtime filter of Listbox values through a Textbox

I have a Userform with one ListBox and one TextBox. The ListBox contains data and I want to filter these data depending on the text in the Textbox. Moreover, I want to actualize values in the ListBox during typing a text in the TextBox. This is very simple and I'll show you how to do it.

2016-01-22

How to remove diacritical marks

Have you ever deal with diacritical marks? Some languages contain characters with diacritical marks, even English language. To replace these characters with their regular equivalents two string constants are usually used. The first one contains the characters with diacritical marks (something like "äáâăąćçčďđëéěęíîĺľłńňöóôőŕřśşšťţüúůűýżźž") and the second one contains the characters to replace them ("aaaaacccddeeeeiilllnnoooorrsssttuuuuyzzz").

2016-01-08

A "text effect" in Headers or Footers

I tried to customize headers in my workbook and I discovered a bug. I suppose I'm not the first one and I know I'm not the last one. This bug isn't serious, moreover could be a little bit helpful.

2015-12-11

VBA - how to unzip or zip files

Sometimes people ask me whether it is possible to work with zip archives directly in Excel application. That's why I decided to put here subroutines that can unpack a zip archive, pack up files to a zip archive or replace (actualize) an existing file in an existing zip archive.

2015-09-04

How to create an outline from a database

I've been asked to create a list of elements from a database with the following requirements: the elements have to be arranged hierarchically and there have to be a possibility to collapse/expand them by levels. The structure of the database is set by levels, ie. 1st column = the highest level, 2nd column = the lower level, ..., the last column = the lowest level.

2015-05-18

Horizontal page breaks

Time to time someone asks for something like: "I have a lot of rows with data and I would like to have subtotals for each printed page. Is there a method how to do this?" It's not a problem to create the subtotals for the most of the users. But how to find page breaks? There are several methods which are less or more reliable. I want to show how to do this with Excel4Macro user defined function. What is a significant plus is that the height of rows don't have to be the same or the rows can be hidden.

2015-01-14

Easy and quick formula translation

Are you using a localized version of MS Office? Did you find a formula with the English names of functions? You can translate each function in the formula manualy or you could use Immediate window in VB editor.

2014-12-30

Blogger - a downloadable file with a counter

I found several manuals how to add a downloadable file to a post in Blogger.com. I also wanted a download counter, so I was looking for, I was reading, I was thinking and finally I was successful. Lest I forget, this post is a manual. But maybe it could help to someone else. ;)

2014-12-09

How to change a formula

I have the same formula in multiple cells and I want to change this formula in all these cells. This is a simple task if the formula is placed in a continuous range. I do it thus:

2014-12-04

Array formula (CSE) in a VBA code

Sometimes for continuing of a code we need to get a value from a range in the sheet. For example we have a range with numbers and we want to find a minimum. There is the object called WorksheetFunction, then we can write: