Click here to Skip to main content
15,171,303 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
All Data bind from Database dynamically , we can not count the value of lists.

A column in worksheet1 having a list
after select value in list A, Column B will be bind

But in column B Dropdown List having Blank values(remove the blank value)

Column A bind from worksheet 2,
Column B Dropdown list bind from worksheet 3 according to column A selection. but contains blanks value

What I have tried:

I use OFFSET , resize column , etc but didn't get success.
Updated 24-Aug-21 13:49pm
CHill60 20-Aug-21 8:46am
Your post is not clear. How are you "binding" in Excel - is this a Power Query or populated some other way? How are you defining your dropdowns?
"But in column B Dropdown List having Blank values(remove the blank value)" - what does that actually mean?
And what is the actual problem?
Member 11449483 23-Aug-21 0:23am
Hi Chill60 ,

Thanks for your support,

I am binding drop-down from C# Code, Drop-down values will be dynamic.

Drop-down B list items will be populated based on Drop-down List A item selections.

so My problem is this , if column B allocate for drop down B binding, so we don't know the values of drop-down B because its bind from Database, So that If values are more then table selection(Table for column B) then that values got missed, and if values are less then table selection for drop-down B, then drop down B filled by list values and blank spaces.
CHill60 23-Aug-21 7:43am
You are still not being clear. How are you "binding" - this is not a term that is usually used in the context of raw Excel (I am excluding Add-Ins here) Describe how you have set up your Dynamic drop-downs because now you are saying they are dependent on a database but in the original post the data was coming from another worksheet (2).
Remember, we cannot see your screen or your workbook and we definitely can't read your mind - you have to give us enough details or we simply can't help
Member 11449483 24-Aug-21 0:32am
hi chill60,

Actually my problem is this,all data comes from DB in worksheet 1 and worksheet 2,
in worksheet 3 we have 2 drop downs ,
User can select 1st drop down then 2nd drop down will be bind based upon 1st drop down selection,

worksheet 1:
DOM Domestic
BEHV Behaviour

Worksheet 2:

Here is DOM and BEHV in worksheet 2 is column name and dom1 ,dom2,dom3,dom4,behv1,behv2,behv3,behv4 comes from DB.

In Worksheet 3 , user select in 1st dropdown DOM then dom1,dom2,dom3 dom4 will be the element of Drop down 2 , if user select behaviour(BEHV), then 2nd drop down element will be behv1,behv2,behv3, behv4,

Now come to the problem: element in worksheet 2 will be max up to 100 then dropdown 2 will miss the element , if we select table range 100 , and element can be 120 (then 20 element will be missed), if element is 80 then (blanks will be added in second drop down).

We need to show exact element it could be 70 , 80 150, 120.

Please help: if you unable to get the problem , whatsapp me any time, please help me its urgent issue , getting too delay.

Thanks in advance
CHill60 24-Aug-21 3:51am
Never post your personal contact details on an open forum like this - unless you like getting spammed. In any event, I do not contact complete strangers on the internet except through forums such as this.
I don't know what "comes from DB" means. HOW is your data populated from the database?
Member 11449483 24-Aug-21 3:57am
its in Datatable paste to Excel sheet.

actually its a blank excel template, and data is filled by code C#, and template download with data from my website for upload data.

1 solution

for empty excell string fields i use one space =IF(ISEMPTY (D2);" ";D2).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900