Basic data entry (vba)


Blog updates by email:

Delivered by FeedBurner

 

Leave a Reply

List all tables and corresponding headers in a workbook (vba)


Blog updates by email:

Delivered by FeedBurner

 

Leave a Reply

Basic invoice template in excel


Blog updates by email:

Delivered by FeedBurner

 

3 Responses to “Basic invoice template in excel”

  1. Rattan Says:


    Thank you very much. This solution has worked nicely.

    Now, say if I have 1000 names alltogether. I guess I'll have to copy the array formula upto cell A1001. Also, I will have to increase the $A$500 upto $A$1001 in the Named Range Formula. Is that right?

    Thanks again.

  2. Rattan Says:


    Hey Oscar,

    I have done a slight change in my workbook. In Sheet:Calc, I have made a table in Column A and named it tblAllNames. Then I copied the array formula in its first row and adjusted the table rows as far as I needed (by pulling down the bottom right corner of the table). This way the formula copies itself in all the rows. Also, I can add names, which don’t exist in either of the Customer or Vendor tables, such as Bank Name or Employee Name, etc. I do have to remember not to sort this table because I tried that and it messed up things.

    Then after this I created a Named range called AllNames and simply replaced the range by table name.

    In its formula box I typed: =OFFSET(tblAllNames, 0, 0, MAX(IF(tblAllNames"", ROW(tblAllNames), "A"))-1).

    This worked fine.

    Can you please explain how this formula works? Why do you have “A” in it?

    By the way, what if I make another table called tblEmployee and want to add all employee names to my drop down list as well . I’m sure a lot of things are going to change in the array formula.

  3. Oscar Says:


    Rattan,

    In its formula box I typed: =OFFSET(tblAllNames, 0, 0, MAX(IF(tblAllNames"", ROW(tblAllNames), "A"))-1).
    This worked fine.
    Can you please explain how this formula works? Why do you have “A” in it?

    You can also use "". The "A" is just a random letter. Max function handles only numerical values, remaining values are ignored.

    =OFFSET(tblAllNames, 0, 0, MAX(IF(tblAllNames<>"", ROW(tblAllNames), "A"))-1).

    Explaining the named range formula
    The formula gets all values in tblAllNames. I can´t use counta function in this case.

    Step 1 - Convert nonempty values to row numbers
    IF(tblAllNames<>"", ROW(tblAllNames), "A")

    Step 2 - Get the largest row number
    MAX(IF(tblAllNames<>"", ROW(tblAllNames), "A"))

    Step 3 - Get values from cell range
    =OFFSET(tblAllNames, 0, 0, MAX(IF(tblAllNames<>"", ROW(tblAllNames), "A"))-1)

    By the way, what if I make another table called tblEmployee and want to add all employee names to my drop down list as well . I’m sure a lot of things are going to change in the array formula.

    Change formula in sheet Calc to the formula found in this blog post:
    Merge three columns into one list in excel

Leave a Reply

Filter weeks from a date range


Blog updates by email:

Delivered by FeedBurner

 

Leave a Reply

Working with combo boxes (Form Control) using vba


Blog updates by email:

Delivered by FeedBurner

 

One Response to “Working with combo boxes (Form Control) using vba”

  1. chrisham Says:


    Great Article!....... I noticed that your articles are getting truncated in my Reader. Previously I used to get the complete blog directly into my reader..... Thanks again Oscar!

Leave a Reply