PDA

View Full Version : Sleeper Form to populated Selected Cell with Code depending on Radio Option and value



ID_Ant
11-14-2023, 07:03 AM
So appreciate the title is not the greatest - couldn't think of any other way of saying it, so hopefully this will help. Not a total beginner but again no expert; i tried, i failed. Hence turning to you guys for help. And it possibly can't be done. Bear with me on this one please.


So here is the challenge at hand (and no not for school home work or anything like that, mainly work and making my life 100% easier if its possible).


So we have a matrix table:





centre

mid

edge

yes

no

high

medium

low

load



1






























2






























3






























4






























5






























6






























7






























8































































The idea is to have a button on the sheet (lets call it "Add Data"). I would then select a cell i.e. in this example B2, then When the button is clicked a User Form (or something) is presented which sort of looks like this:




O denotes a Radio Button (or anything else easier to use?)


Test1

O - Blank

O - Yes

O - No



Test2

O - Blank

O - Yes

O - No



Test3

O - Blank

O - Yes

O - No



Test4

O - Blank

O - Yes

O - No



......

O - Blank

O - Yes

O - No



Test17

O - Blank

O - Yes

O - No



Each Test1-17 has a code associated to it so Test1 = A, Test2 = B.... Test17 = Q




I then have an option to select 3 options per Test row (Blank is default). If i select Test2 = No and Test 17 = Yes, then click another button on this User Form it would populate the Cell B2 with a "B, Q" (note the colour change). So any option that is not Blank is ignored and only the Yes, No is taken into account - may not even need the blank(?)




An example after the UserForm has been completed:





centre

mid

edge

yes

no

high

medium

low

load



1

B, Q



























2






























3










A


















4






























5






























6






























7
















Q












8

A,B,C,D,E,F





























































Any help in this big ask would be appreciated

June7
11-14-2023, 12:17 PM
Most anything can be done with enough code. However, I am not a big fan of using Excel as a database - assuming you are storing this data input in Excel sheets. I am an Access user and would probably build an Access database to store data in normalized manner and use queries and VBA to manipulate data to desired output structure.

In either case, saving multiple data elements to a single cell/field is big no-no. And do you want that color highlighting as shown?

You say you've tried and failed - so you have a workbook you could provide for analysis?