Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Excel To VB.Net

Excel To VB.Net

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Kh
    wrote on last edited by
    #1

    Is there anyway to translate this Excel program into a VB.Net one ? The Program goes like this: I enter 2 fields : Density & Temperture . They will be converted and used later on to get the Coefficient , The putput is Tabel ASTM table 54-B 2 Input Boxes: in locations I8 and J8 Box K8 =IF((J8*100)-INT(J8*100)<0.1,INT(J8*100),IF((J8*100)-INT(J8*100)<0.3,INT(J8*100)+0.2,IF((J8*100)-INT(J8*100)<0.5,INT(J8*100)+0.4,IF((J8*100)-INT(J8*100)<0.7,INT(J8*100)+0.6,IF((J8*100)-INT(J8*100)<0.9,INT(J8*100)+0.8,(INT(J8*100)+1))))))*10 Box L8 =IF(K8<=771,(346.4228/K8^2)+(0.4388/K8),(IF(K8>=771.1,(IF(K8<=787,(2680.3206/K8^2)-0.00336312,(IF(K8>=787.1,(IF(K8<=838.49,(594.5418/K8^2),(IF(K8>=838.5,(IF(K8<=1075.5,(186.9696/K8^2)+(0.4862/K8)))))))))))))) Output Box M8 =(ROUND(EXP(-L8*(I8-15)-0.8*(L8^2)*((I8-15)^2)),4))

    C K 2 Replies Last reply
    0
    • J John Kh

      Is there anyway to translate this Excel program into a VB.Net one ? The Program goes like this: I enter 2 fields : Density & Temperture . They will be converted and used later on to get the Coefficient , The putput is Tabel ASTM table 54-B 2 Input Boxes: in locations I8 and J8 Box K8 =IF((J8*100)-INT(J8*100)<0.1,INT(J8*100),IF((J8*100)-INT(J8*100)<0.3,INT(J8*100)+0.2,IF((J8*100)-INT(J8*100)<0.5,INT(J8*100)+0.4,IF((J8*100)-INT(J8*100)<0.7,INT(J8*100)+0.6,IF((J8*100)-INT(J8*100)<0.9,INT(J8*100)+0.8,(INT(J8*100)+1))))))*10 Box L8 =IF(K8<=771,(346.4228/K8^2)+(0.4388/K8),(IF(K8>=771.1,(IF(K8<=787,(2680.3206/K8^2)-0.00336312,(IF(K8>=787.1,(IF(K8<=838.49,(594.5418/K8^2),(IF(K8>=838.5,(IF(K8<=1075.5,(186.9696/K8^2)+(0.4862/K8)))))))))))))) Output Box M8 =(ROUND(EXP(-L8*(I8-15)-0.8*(L8^2)*((I8-15)^2)),4))

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You have an excel formula and you want to write a VB program that does the same ? Seems pretty simple to me, do you know any VB ? If you don't and you have no intention to learn, it could save you some grief to just pay someone to write this for you.

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      J 1 Reply Last reply
      0
      • J John Kh

        Is there anyway to translate this Excel program into a VB.Net one ? The Program goes like this: I enter 2 fields : Density & Temperture . They will be converted and used later on to get the Coefficient , The putput is Tabel ASTM table 54-B 2 Input Boxes: in locations I8 and J8 Box K8 =IF((J8*100)-INT(J8*100)<0.1,INT(J8*100),IF((J8*100)-INT(J8*100)<0.3,INT(J8*100)+0.2,IF((J8*100)-INT(J8*100)<0.5,INT(J8*100)+0.4,IF((J8*100)-INT(J8*100)<0.7,INT(J8*100)+0.6,IF((J8*100)-INT(J8*100)<0.9,INT(J8*100)+0.8,(INT(J8*100)+1))))))*10 Box L8 =IF(K8<=771,(346.4228/K8^2)+(0.4388/K8),(IF(K8>=771.1,(IF(K8<=787,(2680.3206/K8^2)-0.00336312,(IF(K8>=787.1,(IF(K8<=838.49,(594.5418/K8^2),(IF(K8>=838.5,(IF(K8<=1075.5,(186.9696/K8^2)+(0.4862/K8)))))))))))))) Output Box M8 =(ROUND(EXP(-L8*(I8-15)-0.8*(L8^2)*((I8-15)^2)),4))

        K Offline
        K Offline
        Khatri Mitesh
        wrote on last edited by
        #3

        Hii Use like this

        myworksheet.cells(11,8).Formula= "IF((J8*100)-INT(J8*100)<0.1,INT(J8*100), _
        IF((J8*100)-INT(J8*100)<0.3,INT(J8*100)+0.2,IF((J8*100)-INT(J8*100)<0.5,INT(J8*100)+0.4, _
        IF((J8*100)-INT(J8*100)<0.7,INT(J8*100)+0.6,IF((J8*100)-INT(J8*100)<0.9,INT(J8*100)+0.8,(INT(J8*100)+1))))))*10"

        may be this helps you. Thanx ~Khatri Mitesh

        1 Reply Last reply
        0
        • C Christian Graus

          You have an excel formula and you want to write a VB program that does the same ? Seems pretty simple to me, do you know any VB ? If you don't and you have no intention to learn, it could save you some grief to just pay someone to write this for you.

          Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

          J Offline
          J Offline
          John Kh
          wrote on last edited by
          #4

          Hy, I just wanted VB.Net program or formula that do the same job as the Excel one. That's all. I couldn't read well the Excel formula & I need to use i in VB.Net. J ,

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups