Results 1 to 10 of 10

Thread: [RESOLVED] using select statement to retrieve data from named range

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2006
    Posts
    97

    Resolved [RESOLVED] using select statement to retrieve data from named range

    Hi everybody

    I have already defined range named Table1 in Sheet1 and I have other sheet to retrieve data from named range by three keys:

    1. Status
    2. date
    3. Nationality


    I am .net developer but unfortunately I didn't use excel professionally and want to use excel with select statement or other things like .net and sql.

    can anyone advice me how can do that?

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: using select statement to retrieve data from named range

    By defining a named range, you enable EXCEL to easily select that range. We can only guess wether this range of yours consists of 3 cells in a single row or column or???.

    Having no knowledgeo f the syntax for VBA is of no problem, just use the makro-recorder. Start it, do a sample of what you are trying to do, stop the recording and look into the automatically produced coded. Being a .Net developer you shouldn't have problem to optimize that code for your needs.
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: using select statement to retrieve data from named range

    bintaleb: Few things

    1) You want to do this via VBA, vb.net or native Excel formulas?
    2) A sample data would actually help with what you want to achieve.

    Sid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2006
    Posts
    97

    Re: using select statement to retrieve data from named range

    Quote Originally Posted by opus View Post
    Being a .Net developer you shouldn't have problem to optimize that code for your needs.
    Hello there,

    thank you so much for help

    you are definitely correct the concept of writing code is same but in excel you are dealing with cells that is different.

    I am going to try macro.

    bintaleb

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2006
    Posts
    97

    Re: using select statement to retrieve data from named range

    Quote Originally Posted by koolsid View Post
    bintaleb: Few things

    1) You want to do this via VBA, vb.net or native Excel formulas?
    2) A sample data would actually help with what you want to achieve.

    Sid
    Hi Sid

    yes I want to do that by native Excel formulas.

    regarding sample data I need to convert it to english first but let me tell what I am thinking, I going to use for loop to check record by record with if statement to count how many people are there by condition, today I going to try that and going to inform you.

    bintaleb

  6. #6
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: using select statement to retrieve data from named range

    Quote Originally Posted by bintaleb View Post
    you are definitely correct the concept of writing code is same but in excel you are dealing with cells that is different.
    I suggested the macro-recorder, since thisc one will give you a valid sample of code that deals with native excel cells. That way you will get a shortcut to step into vba code!
    If you need further help, just "call".
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  7. #7
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: using select statement to retrieve data from named range

    Quote Originally Posted by bintaleb View Post
    I going to use for loop to check record by record with if statement.....
    Am I missing something, is your data source an excel- or access-file?
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jul 2006
    Posts
    97

    Re: using select statement to retrieve data from named range

    Quote Originally Posted by opus View Post
    Am I missing something, is your data source an excel- or access-file?
    Hello opus

    my data source is an Excel file, but I think I am going to use macro because most of our friends have suggested that.

    bintaleb

  9. #9
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: using select statement to retrieve data from named range

    bintaleb: On one end you say you want to use native Excel formulas and on the other end you talk about looping and macro recording etc. Which one is it?

    Excel Formulas or VBA Code?

    Sid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Jul 2006
    Posts
    97

    Re: using select statement to retrieve data from named range

    Quote Originally Posted by koolsid View Post
    bintaleb: On one end you say you want to use native Excel formulas and on the other end you talk about looping and macro recording etc. Which one is it?

    Excel Formulas or VBA Code?

    Sid
    thank you koolsid for your concern

    in the beginning I was thinking to use VBA to achieve my task but our friends have adviced me to use macro or Excel Formulas if I am correct, I would like to inform you I have achieved my task by using advance filter with count function to fill Employee report according Status, date and Nationality.

    thank you so much sid
    thank you so much opus

    bintaleb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width