Forum Discussion
Using tables, lists, and dropdowns and not sure how to make this work…
Again welcome home to you and I hope you get some R&R (transition time) from your vacation before you have to go back to work.
Thanks for your well wishes, Diane. The fact of the matter is that I'm in my early 80s, have been retired for just over twenty years, so although my wife and I keep very busy with multiple activities, none of them are income producing (don't worry; we're doing fine!). We spend the summer in a home along the New Jersey shore.
Is there a way to make Word perform calculations that are as complex as Excel?
No. Not to my knowledge. There are ways to embed an Excel sheet in a Word document, but I don't think that's what you should be doing.
Hearing the history now, I can see why you don't want to change that form. HOWEVER, if I were in your shoes, I would work to create an approved Excel spreadsheet for the use of those who want to use Excel to record hours (and all the associated data), and do it as a clean Excel spreadsheet. I can't believe that a clean and clear spreadsheet couldn't be created, and be far more reliable that working to make that one you have serve the purpose. It wasn't what it was designed for in the first place.
Hi!
Thanks for your well wishes, Diane. The fact of the matter is that I'm in my early 80s, have been retired for just over twenty years, so although my wife and I keep very busy with multiple activities, none of them are income producing (don't worry; we're doing fine!). We spend the summer in a home along the New Jersey shore.
That sounds very nice! I'm glad you two get to enjoy that!! 🙂
I'm sorry I couldn't get in here yesterday to thank you, there was maintenance going on here in the forums I guess.
I had typed out here what I was going to ask but then realized that I completely missed something you said in your first help to me and that was that you made a couple databases.
I spent all day yesterday creating tables and lists and whatnot to recreate what you'd done (or so I thought, lol) and no matter what I did I couldn't make it work like yours does. Soooo very close but no cigar...
So I spent this morning defining my lists and tables like I had them prior to changing them to try to follow your example and still no luck.
So many errors coming up through all this, delimited list errors, etc., lol.
Then it finally clicked with me when I opened the Name Manager that EE_DB means database and you had mentioned databases in your first help to me (my brain takes a very long while sometimes to click things together), and that's when I realized that your tables aren't simple tables/lists.
I've managed to use your database by adding my 347 to your workbook, changing some of the info in the tables/databases, and copying the various formulas that you've used. Thank you!!
🙂
1. hmm, something I've done while revising the info in the tables/list/database is causing #Value errors now when I delete the info in the employee field on the 347. I think I have to start over. lol, I've retyped this message so many times over past couple days as I've worked through this and I think I've just massively confused myself.
I'll come back here once I've figured out where I went wrong with the #Value error.
Okay, whoo-hoo, I'm back with my first question... (I just realized that my smiley faces don't make it in here - I am grinning with happiness over what you've helped me to accomplish!)🙂
In your version of the 347, when I look at the "Data > Data Validation" I see that you've got "List" and =Employees for a few of the fields ("Exemptions" for example).
When I go to the Exemptions field on my 347 and select "Data > Data Validation" and select List, I have to manually enter =Employees in the source box. But then I get an error that "A named range you specified cannot be found". How do I make mine work like you made yours work?
You have been so wonderful! I'm tickled over what you've helped me to put together. Thank you again so much and have a great day!
Diane Dennis 🙂
- DianeDennisJul 26, 2023Brass Contributor
Oh, outstanding, thank you!! 🙂
I'm off to start a new thread about why my dropdown lists are appearing the way they are on my daughter's computer and if there's a way to change it. 🙂
Thank you again and have a terrific evening!! - mathetesJul 26, 2023Gold Contributor
- DianeDennisJul 26, 2023Brass Contributor
Oh, that's excellent! I was thinking (hoping?) that might be a possibility. Thank you!
That's very interesting about the helper columns. There have been times when I thought something like that would be useful but I didn't really have a super-strong need ever to pursue it. Very nice to know that capability exists!
And, lol, that's me... creative (or more like "bull in a china shop"). 😉
Thank you again! - mathetesJul 26, 2023Gold Contributor
One of the things we "experts" sometimes advise--to avoid overly complicated formulas--is to create what are called helper columns. The helper columns, which can be hidden from the user once everything is working, are where interim processes or calculations are performed, with the results used by other helper columns or, ultimately, displayed in the "visible portion" of the workbook.
In essence, what you're suggesting is that on a bigger scale: a helper worksheet, performing things behind the scenes, with the clean results displayed on the printable "final" worksheet.
It's a workable idea (actually quite creative) given the constraints you've been given. It does present the risk of being inadvertently messed up by somebody who doesn't realize what's going on. So you will want to investigate and use (if you're not already) spreadsheet protection.
Out of curiousity, if the 347 worksheet was set up "like a spreadsheet should be" would I have been able to accomplish my most recent desire, trying to get the real name (column a) to appear in the cell even though the dropdown list was mapped(?) to the coded name (column b)?
If I understand what you're doing, yes. Essentially you're creating that aforementioned "helper column"
- DianeDennisJul 26, 2023Brass Contributor
Thank you so much! I too have enjoyed myself (may have even uttered a couple squeals of joy, lol). 🙂
I have a thought running around in my head about having two 347's in the workbook, one laid out like you've said it should be (347-A) and the one that I'm currently stuck with using (347-B).
When I'm ready to pursue it and I have questions about it I'll go ahead and start a new thread but I wanted to mention it here to you since you've been helping me so much with this. 🙂
What I was thinking is that 347-A would be the one that does all the work (like the 347-B is currently doing) and because it's laid out like a spreadsheet should be everything will work properly, including the more complex issues.
The cells on the 347-B could then have simple references to the 347-A worksheet instead of needing complex formulas, etc.
The user would fill in the 347-A worksheet but print the completed-automatically 347-A worksheet.
Out of curiousity, if the 347 worksheet was set up "like a spreadsheet should be" would I have been able to accomplish my most recent desire, trying to get the real name (column a) to appear in the cell even though the dropdown list was mapped(?) to the coded name (column b)?
Thank you again, Mathetes! Have a great day!! - mathetesJul 25, 2023Gold Contributor
I shall continue the fight and figure things out one way or another. 😉
Thank you again so much, MathetesYou're welcome, for sure. It was (and continues to be) an interesting challenge. I'm still available if you want to post more questions. You might want to start a new thread with a clear new question or two. And make sure you include a link to the then current version.
- DianeDennisJul 25, 2023Brass ContributorThank you, truly, Mathetes for all of your time and help!
You're correct, it's just the classification and hourly wage rate (and hours worked) that would change when the employee is wearing a different hat; he could wear a different hat multiple times a week on a project.
Unfortunately, I'm in a situation where I have to do this. I totally get what you're saying about going about it a different way but in this case I'm stuck doing it the way I am. I shall continue the fight and figure things out one way or another. 😉
Thank you again so much, Mathetes, and I wish you an absolute blast of a summer holiday at the beach! 🙂 - mathetesJul 25, 2023Gold Contributor
Diane, as we've been over, I think it's entirely possible that you (your organization) are expecting too much of this one spreadsheet--for it to serve as a printed template to be filled in manually AND to serve as an Excel spreadsheet backed up by a data table, to do a lot automatically. A good deal of that "too much" stems from it having been originally designed solely for the purpose of printing, and as such it utterly mangles all kinds of principles of good spreadsheet design.
Okay, for this particular issue, a user might have 1 employee that works under three (or however many) different classifications and therefore has to be listed 3 different times on the spreadsheet, with the accurate info for each classification (pay, etc.).
Just to tackle this dimension: 1 employee, no matter how many different hats she or he may wear, is going to have the same SSN, same withholding, same benefits. I suppose it's possible--though unlikely?--that there may be different pay rates based on what hat is being worn. But the point is that much will remain the same, so it'd be a better design--far better--to keep the primary identity the same (name, SSN, etc) and just make the job/task/"hat" different and the hours apportioned to that job, task or hat.
Truly, Diane: While wishing I could be more optimistic, I think you (the organization for which you work) should be pursuing getting an expert in to do this and that expert should start from scratch. In my humble opinion. (And I'm not offering myself for the task; I'm retired, 81 years old, enjoying a summer at the beach.)
- DianeDennisJul 25, 2023Brass ContributorHi, Mathetes, and thank you!! 🙂
Here's a link to the latest version:
https://docs.google.com/spreadsheets/d/1HqaKO7QPSB-qMDa3WQdP8YsbvifwqQuN/edit?usp=sharing&ouid=114726432609057347750&rtpof=true&sd=true
Heads up though that I think I’ve messed it all up. It was coming together so well but now I’m just beside myself, so confused, and afraid I’m going to have to start over due to my confusion. Too under the gun…
Okay, for this particular issue, a user might have 1 employee that works under three (or however many) different classifications and therefore has to be listed 3 different times on the spreadsheet, with the accurate info for each classification (pay, etc.).
So, I was trying to have the dropdown list in A17 on the 347 worksheet reference column B on the Tables1 worksheet but when the user selects from that dropdown, I'd like the corresponding name in column A to populate A17 instead of it being populated with the name from column B.
I think the formulas that I entered though have broken it. I only did it for the first employee and now his information across the row won’t come up when his name is selected.
But, as mentioned, I may have wiped it out and have to start over so it might be more of a mess than you’re anticipating. I’m sorry about that.
Thank you again so much!! 🙂 - mathetesJul 24, 2023Gold Contributor
I need the user to be able to select the "CodedEmployeeName" from the dropdown list in A17 on the WH347 but have it populate with the "EmployeeName" rather than the "CodedEmployeeName".
If I understand what you "need" here, you are saying you want, in cell A17, to select something like "CODE1234" but have "Harrison, George" appear also in cell A17. That's not possible. It probably would be possible with a VBA routine (which is not my area of expertise), but I'd be wary of that as a solution for a variety of reasons.
If I'm misunderstanding your request, please clarify. And if you can, post another copy of the current workbook...I'm looking at my most recent, but strongly suspect that is not really helpful.
- DianeDennisJul 24, 2023Brass Contributor
Hi Mathetes!
I hope this finds you well!
I need to take everything you've helped me with here a step further and I'm hoping you can help me. 🙂
I added a column next to the "EmployeeName" column (A), titled "CodedEmployeeName" (column B).
I need the user to be able to select the "CodedEmployeeName" from the dropdown list in A17 on the WH347 but have it populate with the "EmployeeName" rather than the "CodedEmployeeName".
I tried this:
Selected cell A17 on the WH347.
Clicked on the "Formulas" tab in the Excel ribbon.
Clicked on "Name Manager."
Created a new name called "RealName."
Entered the following in the Refers to field:
=INDEX(Tables1!$A$2:$A$501, MATCH(INDIRECT("WH347!A17"), Tables1!$B$2:$B$501, 0))With cell A17 still selected, I went to the "Data" tab in the Excel ribbon, and selected "Data Validation" from the "Data Tools" group.
In the "Data Validation" dialog box, I selected the "List" option from the "Allow" drop-down menu.
In the "Source" field, I entered the following:
=Tables1!$B$2:$B$501Unfortunately, it's still displaying the coded employee name from column B instead of the real name from column A.
What have I missed? Or have I totally messed it up? I finally quit because it just kept getting crazier and crazier, lol.
Thank you so much, Mathetes!! 🙂
- DianeDennisJul 12, 2023Brass ContributorHi!
I'm not seeing my response here from the other day; I'm sorry about that! I don't know what I'm doing wrong here to cause my posts to not show up.
Thank you so much for all of your help with this. I will definitely keep all of this. That "Excel Tables link", the info there looks very helpful!
I hope you have a wonderful day, mathetes!!
Diane - mathetesJul 07, 2023Gold Contributor
Yesterday when I deleted a couple of columns from the EE_DB, I had to manually change the references on the 347 sheet. Is there a way to delete columns/rows that will automatically update the references on the 347 so that it doesn't have to be done manually or is that just a part of how it works?
Certainly when you're using VLOOKUP, where you refer to the column to be retrieved by offset number, I think you need at the very least to review the formula to make sure that your deletion hasn't changed that offset. The. bigger lesson would be to design the table up front so that you're not needing to delete columns, in particular not deleting columns from the early or central part of the table. You can always add columns toward the end (right end) of the table.
If you've not read it, this resource on Excel Tables would be worth keeping as a reference. The same site has materials on all of the VLOOKUP function, along with others (INDEX and MATCH, for example) that can also be used. Each method has its advantages.
- DianeDennisJul 07, 2023Brass Contributor
Hi!
I thought I posted a response here yesterday but it's not showing up. I probably forgot to hit the "post" button...
Thank you SO MUCH for your time and help and for what you helped me to accomplish and learn!!
Oh, I did post; I remember that I included info on what I did to accomplish something else on the sheet. Maybe I entered something wrong and it didn't approve my post..
I figured out how to make the withholding percentages work! Using your code and other code that I had that wasn't quite right, I managed to put it together. Now the withholding box on the 347 calculates using the percentages listed in the EE_DB table.
Yesterday when I deleted a couple of columns from the EE_DB, I had to manually change the references on the 347 sheet. Is there a way to delete columns/rows that will automatically update the references on the 347 so that it doesn't have to be done manually or is that just a part of how it works?
Again, thank you so much, mathetes!!
Diane
- mathetesJul 06, 2023Gold Contributor
It's looking nice. I made a small change in the first entry in the FICA column: since we "named" cell L2 in the tables sheet "FICA" you can actually put that name into the formula. One of the big advantages of named ranges is using names to make formulas more legible.
Let me know if you want more help with it....I am a big advocate of people learning through figuring out for themselves, even if it takes some trial and error.
- DianeDennisJul 06, 2023Brass ContributorOh! I'm sorry about that! I think I've got it set up now. Thank you again! Diane
- mathetesJul 06, 2023Gold ContributorI had to send you a request to be granted access. I think there's a setting when you first do this whereby you can grant access to anybody with the link. For the purposes of these boards, that's what you should use if you want others to see it. Otherwise, each person will have to request that access individually.
- DianeDennisJul 06, 2023Brass Contributor
Thank you!
I just learned how to do this the other day when I uploaded the first one here so fingers crossed that I remember how it works, lol...
https://docs.google.com/spreadsheets/d/1bnbDf_Nn8myBRMIWKRyVEo8UDZ66Hxcu/edit?usp=drive_link&ouid=114726432609057347750&rtpof=true&sd=true
Thank you again!
Diane
- mathetesJul 06, 2023Gold Contributor
I'd love to show you what you've helped me to accomplish so far if you'd like to see it.
I would be very happy to see it. And I'd suggest posting the link right here in this thread, since it is a continuation.
- DianeDennisJul 06, 2023Brass Contributor
Oh my gosh! I figured out the #Value error! I looked to see what you had in the "Gross Amount Field" and it was slightly different than mine so I edited mine and ... no more #Value error!
You are the best!! I can't tell you how tickled I am with how this is coming out. Thank you SO MUCH!
I'd love to show you what you've helped me to accomplish so far if you'd like to see it.
My next step is to figure out how to get the "Withholding Tax" fields on the 347 to multiply the percentages in the "Withholding Tax" column (that I added to the EE_DB table) against the "Gross Amount Earned" field that gets manually entered on the 347.
I got the flat rates (e.g., "Tools") to work; now for those pesky percentages.
Should I post that in a different post or does it still fit here?
And if I do need to put that in a separate post, how do I choose which of your answers here to select as the answer?Thank you again so much, Mathetes!!
Diane
- DianeDennisJul 06, 2023Brass Contributor
Hi!
By the way, did you overlook that I'd created those new tables?!
I totally remembered your tables, I even used them, thank you so much. 🙂
I started a new workbook with your workbook, and then added another worksheet with my original design 347 form, and then tried to follow along from there with what you’d done while trying to make it work in the layout that I’m currently using.
I spent all weekend and really was making some progress, ooh I was so tickled with how it was going {big cheese-eating grin}, but then I messed it up Sunday afternoon. Crash. Burn. lol...
I revised the column for SS so that it contained the employee’s name and SS, and got that to work perfectly (but I must have deleted it when I was cleaning up after my crash & burn, so I have to do that again).
I then added a few columns to the EE_DB:
"Fringe Benefits" (differing but flat $ amount for each employee), and
“Withholding Tax” (differing percentage rates for each employee), and
“Tools” (differing but flat $ amount for each employee)And I got the “Fringe Benefits” and “Tools” to work great on the 347, but then I started getting #Value errors in the "Gross Amount Earned" field when I’d delete the employee selection from the dropdown list in the employee name/SS field (if that makes sense). I checked your version and that doesn’t happen, so I know I messed something up.
Maybe adding columns or maybe trying to do the Data Validation is where I messed it up. I’m going to try again without the data validation to see what I can accomplish. {smile}
I did save a copy of the last version of what I was doing. Would it be alright if I upload it to show you what I’ve managed to accomplish (and the #Value error that I get when I delete an employee name on the 347)?
I’m guessing one of the things that went wrong is that I tried to do the “Lists” but also the other is I may have messed up the EE_DB when adding the three columns. Something I did is causing the #Value errors, just not sure what.
Thank you again so much for all of your help and your time!
Diane - mathetesJul 05, 2023Gold Contributor
When I go to the Exemptions field on my 347 and select "Data > Data Validation" and select List, I have to manually enter =Employees in the source box. But then I get an error that "A named range you specified cannot be found". How do I make mine work like you made yours work?
You shouldn't be using Data Validation at that point in the 347 Form; it's a VLOOKUP formula that gets the value, just as do all the others, once you've entered the SSN. Here are the formulas that were in my worksheet.
- For Last Name: =IFERROR(VLOOKUP(A17,EE_DB,2,0),"")
- For First Name: =IFERROR(VLOOKUP(A17,EE_DB,2,0),"")
- For Exemptions: =IFERROR(VLOOKUP(A17,EE_DB,4,0),"")
- For Title (or your equivalent): =IFERROR(VLOOKUP(A17,EE_DB,5,0),"")
- and so forth.
A central idea of a data TABLE is that you can reference all of the columns with VLOOKUP or one of many equivalent data retrieval functions (XLOOKUP, INDEX and MATCH paired), simply by referring to the key (in this case the SSN) and then the offset number of columns. Using Data Validation for each column is to invite error. Just make sure the first entry is correct, and the table is consistent with relevant info for that person, and the rest follows from that.
Data Validation has been cleared from that first set of columns in this version, and you can see how it works.
By the way, did you overlook that I'd created those new tables?!