I have 3 worksheets in a single workbook: Summary, Invoice, and Expense Report. In the Summary sheet list of data, I have named cells as shown below:
Customer_Name: customer name
Billing_Addr_1: 1st line of billing address
Billing_Addr_2: 2nd line of billing address
City_St_Zip: City, State or Province, and Postal Code]
I'd like the info on the Summary Page to generate the Invoice. Everything works fine for Customer_Name, Billing_Addr1 and City_St_Zip. I am having trouble handling customers who do not have a 2nd line of billing address.
If the customer doesn't have that second line (Suite 100 in this case) in the address, I want the invoice to simply skip it and show City_St_Zip.
For example:
with 2nd address line
John Doe Construction Co.
123 Main Street
Suite 100
Anytown USA 12345
without 2nd address
John Doe Construction Co.
123 Main Street
Anytown USA 12345
I have tried:
IF(ISBLANK(Billing_Addr2),City_St_Zip,Billing_Addr_2)
IF(ISBLANK(Summary!$D$15),City_St_Zip,Billing_Addr_2)
IF(ISBLANK(Summary!$D$15),City_St_Zip,Summary!$D$15)
IF(Summary!$D$15=0,City_St_Zip,Summary!$D$15)
I have looked in the help section in Excel itself and found it to be predictably obtuse and of zero help. I've done web searches about this problem and explored the results for quite some time and haven't found the answer. I realize that this is probably a very basic question and am embarrassed to be asking it, but can someone please point out my error?
Thanks in advance.
Related
I am attempting to write a macro in Excel that is a bit complex (at least for me) to assist at work. I have a list of employees and their salary ranges and I want to be able to break the sheet up by managers and their direct/indirect reports. For example: John Smith is the VP and has 5 direct reports, I want the macro to grab the 5 ranges of those direct reports, but also the ranges of the direct reports (if any) of those 5 people. So John Smith would receive the salary ranges of all the people in this example, but Sam Jones would only receive his 2 direct reports and the 3 direct reports of Jane Doe as she is a direct report of Sam. Hopefully that somewhat makes sense! It can also delete any duplicate ranges (if career level, grade, zone, structure are the same for more than one person). One more, if it could please save the file under the name of the manager - thank you!
These would be the expected results when running the macro, in this example it would output 3 workbooks:
John Smith Output
Sam Jones Output
Jane Doe Output
I'm using a spreadsheet to process information on people as it comes in, including names, addresses, etc.
The way we receive the addresses allows for them to come in very messily and the addresses themselves vary so much. We also have Eircodes which are seven digits but provide further issues as some people put them in as "XXX XXXX" and others "XXXXXXX" and some only put in half the Eircode to begin with. All this information appears in a single cell with no commas to separate anything.
The addresses come in all over the place, examples would include:
12 Example Street Made Up Area Co. Dublin Dublin Dublin 22 D220000
12 Example Street Made Up Area Dublin D 22
12 Example Street Made Up Area Made Up Area Dublin D220000
I want to make them look roughly like this:
12 Example Street Made Up Area Dublin
The County name is different across the addresses but is always included and is always one of the 26 Counties in ROI.
Can anyone help me with a VBA code for this please? I have a few VBAs to sort out other information and I've combined them all to a Master command and a single button on the main page, so I'd like to add it to that.
P.S. I'm having a similar issue with phone number prefixes so I'm hoping the logic here will apply there too.
Good afternoon,
I'm currently working on setting up a pivot table for chart that outlines an Average Revenue per Person by Line Type. Using the pivot table, I can sort everything out, but when I try to get a count of person, it adds all instances of that person's name up. What I want is that if the person's name appears once in a month, all other instances in that month of the person's name are not counted. But during a new month, the person's name will appear once more. So, it is somewhat like a unique count, but only unique per month.
My excel table looks something like:
A B C D
Date Person Revenue Line Type
1/1/2015 John $100 Toy
1/6/2015 Phil $200 Toy
1/6/2015 Jane $25 Garden
1/7/2015 John $50 Electronics
1/25/2015 John $10 Electronics
2/1/2015 John $10 Toy
2/17/2015 Phil $30 Garden
2/20/2015 Bob $500 Electronics
2/21/2015 Jane $100 Garden
So, as you can see, a person's name can occur more than one time in a month, and in more than one month. Currently, the code I am using for my helper column (E) is:
=1/COUNTIF($B:$B,B2)
This has only been giving me a count of patients throughout the entire year, not taking new months into account. I also have attempted this formula:
=IF(SUMPRODUCT(($B$2:$B2=B2)*($A$2:$A2=A2))>1,0,1
This only counts values that occur on the same day. I've tried adding in MONTH() checks and such, and am only getting syntax errors. I'm not sure where to turn for this one. Thank you!
Thanks to #TomSharpe's advice, I added a helper column to concatenate Month/Date and the Patient's name like so:
=MONTH(A2)&"-"&B2
Then used the original formula (below) to COUNTIF divided by 1.
=1/COUNTIF($B:$B,B2)
This gave me exactly what I needed.
Thanks again!
I wonder if someone could help me,
I am not a whiz at excel although i know some things, what am after is, I have a worksheets from Monday to Friday, say on a Monday I have time, from, to etc. for car trips, in the 'from' would be the address, I have a list of 1,000 street names on a separate sheet, I want to be able to start typing a street name in the 'from' cell and the street name appear and I can enter it then, is this possible?
I currently have the 1,000 street names above the 'from' column thus it pops up when I start typing, just wanted to know if there was an easier way, as I need to add streets to the list over time, I would be grateful if someone could steer me in the right direction.
So if I understand well, you want to implement automatic completion based on data from another worksheet? Google that. Here is what I found :
http://trumpexcel.com/2013/10/excel-drop-down-list-with-search-suggestions/
http://www.ozgrid.com/forum/showthread.php?t=69642&p=362762#post362762 : cf. the June 1st 2007 comment by Dave Hawley
I am trying to create a booking system using Excel. I know this may not be the best option, however so far this is what I have come up with:
sheet1 with all customer details
sheet2 with all booking details
The customer id and name are ref to sheet2 so I don't have to type them again.
On sheet2 I have the customer name in column A and in Column B dates for different days laid out horizontally.
For example:
Customer Name Course 1 Course2 Course3
John Smith 01.01.2014 02.01.2014 03.01.2014
Bob Green 02.01.2014 03.01.2014 04.01.2014
The problem I am having at the moment is not being able to identify all customers who are booked on same date. For example if I want to see all the customers who are booked for 01.01.2014, how is that possible?
Any help will be great, or if you have better ideas about creating a booking systems suggestions are welcome.
You need to change your layout, then you can apply a filter. A better layout would be:
Customer Name Course Name Date
John Smith Course 1 01.01.2014
John Smith Course 2 02.01.2014
John Smith Course 3 03.01.2014
Bob Green Course 1 02.01.2014
Bob Green Course 2 03.01.2014
Bob Green Course 3 04.01.2014
Then just apply a filter on the Date column. To see all people in the same course and on the same date, apply a filter to both the Course Name and Date columns.