New Posts  All Forums:Forum Nav:

Excel VBA question

post #1 of 4
Thread Starter 
Hey all, its been a while since ive done anything with excel so i could use some help please.

Basically what i need to do is this

If cell A1 contains "adobe flash" then


i need it to see if the cell contains certain text.


thoughts?
Mini Me
(16 items)
 
  
CPUMotherboardGraphicsGraphics
i7 3930k ASRock X79 Champion Gigabyte 7950 Gigabyte 7950 
GraphicsRAMHard DriveOptical Drive
Gigabyte 7950 G.SKILL Ripjaws X Series 16GB DDR3 1866 Corsair Neutron GTX 480GB LG BD-RE 
OSMonitorMonitorKeyboard
Win7 Ultimate Dell U2311H Dell U2713HM Razer blackwindow ultimate 
PowerCaseMouse
Kingwin 1000w Lazer platinum Rosewill Blackhawk Ultra Razer Deathadder 
  hide details  
Reply
Mini Me
(16 items)
 
  
CPUMotherboardGraphicsGraphics
i7 3930k ASRock X79 Champion Gigabyte 7950 Gigabyte 7950 
GraphicsRAMHard DriveOptical Drive
Gigabyte 7950 G.SKILL Ripjaws X Series 16GB DDR3 1866 Corsair Neutron GTX 480GB LG BD-RE 
OSMonitorMonitorKeyboard
Win7 Ultimate Dell U2311H Dell U2713HM Razer blackwindow ultimate 
PowerCaseMouse
Kingwin 1000w Lazer platinum Rosewill Blackhawk Ultra Razer Deathadder 
  hide details  
Reply
post #2 of 4
Depending on what you wanted to do when cell A1 = "Adobe Flash" you may not even need VBA and could just use an excel formula.

Formula is:

=IF(A2="Adobe Flash", "IS TRUE", "IS FALSE!")

paste into any other cell that isn't A2, or end up with a circular reference.

However if you wanted to use VBA then when on a worksheet press ALT-F11 which will bring up VBA with a very basic IDE. From there feel free to create Modules/SubModules -> Functions/Procedures and have fun. One issue with VBA is that it is a bit more complex than basic formulae so can require a bit of a learning curve if you aren't familiar with computer programming/scripting languages.

However you can pick up an excel (allround) book + Visual Basic or Visual Basic.NET beginners book, and you should be able to pick it up fine.
Felix
(11 items)
 
ESXi 1
(9 items)
 
Dexter
(12 items)
 
CPUMotherboardGraphicsRAM
Intel Core i7 3770S 3.1 GHz Socket 1155 Box  Intel DQ77KB Intel HD4000 integrated gpu STRONTIUM 8GB Sodimm Single DDR3 1600Mhz 
Hard DriveCoolingOSKeyboard
Intel 520 Series SATA3 25nm 120G 2.5' Scythe Kozuti CPU low profile heatsink fan Microsoft Windows 8 Pro w/ Media Centre Corsair Vengeance K90. Performance, MMO, Mechan... 
PowerCaseMouse
Dell 19V 4.62A (Round) PA-10 Original AC Adapter Antec ISK110 VESA Mini-ITX Case, 90-watt adapte... Corsair Vengeance M90. Performance, MMO, Mechan... 
CPUMotherboardGraphicsRAM
Intel Core i7 3770 3.40 GHz 8M LGA1155 Processor Intel DQ77MK Intel HD4000 integrated gpu STRONTIUM 8GB 1600MHz DDR3 Dimm Single Module P... 
Hard DriveCoolingOSCase
SanDisk Blade 4GB Scythe Big Shuriken Rev. 2 ESXi vSphere 5.1 Coolermaster Elite 343 MATX Mini Tower Case Bla... 
Other
Dell X3959 dual port Intel GbE NIC 
CPUMotherboardGraphicsRAM
Intel Ivy Bridge Core i7 3770K Unlocked Quad Core ASUS SABERTOOTH-Z77 PCI-E3.0 x 16 Motherboard Intel HD4000 integrated gpu Corsair Vengeance 16GB (4x4GB) DDR3 1600MHz CL9... 
Hard DriveHard DriveCoolingCooling
Western Digital Scorpio Black 2.5 inch 320GB Western Digital Caviar Raid Edition4 1000GB (1TB) Corsair Cooling Hydro Series H100 Liquid CPU Corsair "Air Series" SP120 Quiet Edition Case Fan 
OSPowerCaseOther
Openfiler 2.99-2 Corsair AX850 850W  Corsair Obsidian 650D Black Mid Tower Case with... Dell Perc 6/i RAID Controller 
  hide details  
Reply
Felix
(11 items)
 
ESXi 1
(9 items)
 
Dexter
(12 items)
 
CPUMotherboardGraphicsRAM
Intel Core i7 3770S 3.1 GHz Socket 1155 Box  Intel DQ77KB Intel HD4000 integrated gpu STRONTIUM 8GB Sodimm Single DDR3 1600Mhz 
Hard DriveCoolingOSKeyboard
Intel 520 Series SATA3 25nm 120G 2.5' Scythe Kozuti CPU low profile heatsink fan Microsoft Windows 8 Pro w/ Media Centre Corsair Vengeance K90. Performance, MMO, Mechan... 
PowerCaseMouse
Dell 19V 4.62A (Round) PA-10 Original AC Adapter Antec ISK110 VESA Mini-ITX Case, 90-watt adapte... Corsair Vengeance M90. Performance, MMO, Mechan... 
CPUMotherboardGraphicsRAM
Intel Core i7 3770 3.40 GHz 8M LGA1155 Processor Intel DQ77MK Intel HD4000 integrated gpu STRONTIUM 8GB 1600MHz DDR3 Dimm Single Module P... 
Hard DriveCoolingOSCase
SanDisk Blade 4GB Scythe Big Shuriken Rev. 2 ESXi vSphere 5.1 Coolermaster Elite 343 MATX Mini Tower Case Bla... 
Other
Dell X3959 dual port Intel GbE NIC 
CPUMotherboardGraphicsRAM
Intel Ivy Bridge Core i7 3770K Unlocked Quad Core ASUS SABERTOOTH-Z77 PCI-E3.0 x 16 Motherboard Intel HD4000 integrated gpu Corsair Vengeance 16GB (4x4GB) DDR3 1600MHz CL9... 
Hard DriveHard DriveCoolingCooling
Western Digital Scorpio Black 2.5 inch 320GB Western Digital Caviar Raid Edition4 1000GB (1TB) Corsair Cooling Hydro Series H100 Liquid CPU Corsair "Air Series" SP120 Quiet Edition Case Fan 
OSPowerCaseOther
Openfiler 2.99-2 Corsair AX850 850W  Corsair Obsidian 650D Black Mid Tower Case with... Dell Perc 6/i RAID Controller 
  hide details  
Reply
post #3 of 4
Thread Starter 
it cant be if the cell is equal to that because i need it to be if it contains that anywhere in the cell

for example it could be adobe flash 10.4.303 or adobe flash 11.5.202 etc
Mini Me
(16 items)
 
  
CPUMotherboardGraphicsGraphics
i7 3930k ASRock X79 Champion Gigabyte 7950 Gigabyte 7950 
GraphicsRAMHard DriveOptical Drive
Gigabyte 7950 G.SKILL Ripjaws X Series 16GB DDR3 1866 Corsair Neutron GTX 480GB LG BD-RE 
OSMonitorMonitorKeyboard
Win7 Ultimate Dell U2311H Dell U2713HM Razer blackwindow ultimate 
PowerCaseMouse
Kingwin 1000w Lazer platinum Rosewill Blackhawk Ultra Razer Deathadder 
  hide details  
Reply
Mini Me
(16 items)
 
  
CPUMotherboardGraphicsGraphics
i7 3930k ASRock X79 Champion Gigabyte 7950 Gigabyte 7950 
GraphicsRAMHard DriveOptical Drive
Gigabyte 7950 G.SKILL Ripjaws X Series 16GB DDR3 1866 Corsair Neutron GTX 480GB LG BD-RE 
OSMonitorMonitorKeyboard
Win7 Ultimate Dell U2311H Dell U2713HM Razer blackwindow ultimate 
PowerCaseMouse
Kingwin 1000w Lazer platinum Rosewill Blackhawk Ultra Razer Deathadder 
  hide details  
Reply
post #4 of 4
would something like:

=IF(ISERR(FIND("ADOBE", A2)), "A2 does NOT contain the word ADOBE", "A2 DOES contain with word ADOBE")

work?

Otherwise, if the version string was in the same place everytime you could use LEFT(), RIGHT(), MID(), LENGTH() and MID() ... or a mixture of any to find out that A) it does contain a word and B) what version it is.

NOTE:

FIND(string, instring) should return the number characters from the beginning of instring, until the first occurance of string. If the string is not found, then the function returns #VALUE i think (THIS is simplified, look this function up on msdn for a proper explanation).

So the logic is, if the string was found it would return any number larger than zero. Otherwise it will return #VALUE. SO

If FIND("ADOBE", A2) returns an error then "ADOBE" cannot be found in A2.
Felix
(11 items)
 
ESXi 1
(9 items)
 
Dexter
(12 items)
 
CPUMotherboardGraphicsRAM
Intel Core i7 3770S 3.1 GHz Socket 1155 Box  Intel DQ77KB Intel HD4000 integrated gpu STRONTIUM 8GB Sodimm Single DDR3 1600Mhz 
Hard DriveCoolingOSKeyboard
Intel 520 Series SATA3 25nm 120G 2.5' Scythe Kozuti CPU low profile heatsink fan Microsoft Windows 8 Pro w/ Media Centre Corsair Vengeance K90. Performance, MMO, Mechan... 
PowerCaseMouse
Dell 19V 4.62A (Round) PA-10 Original AC Adapter Antec ISK110 VESA Mini-ITX Case, 90-watt adapte... Corsair Vengeance M90. Performance, MMO, Mechan... 
CPUMotherboardGraphicsRAM
Intel Core i7 3770 3.40 GHz 8M LGA1155 Processor Intel DQ77MK Intel HD4000 integrated gpu STRONTIUM 8GB 1600MHz DDR3 Dimm Single Module P... 
Hard DriveCoolingOSCase
SanDisk Blade 4GB Scythe Big Shuriken Rev. 2 ESXi vSphere 5.1 Coolermaster Elite 343 MATX Mini Tower Case Bla... 
Other
Dell X3959 dual port Intel GbE NIC 
CPUMotherboardGraphicsRAM
Intel Ivy Bridge Core i7 3770K Unlocked Quad Core ASUS SABERTOOTH-Z77 PCI-E3.0 x 16 Motherboard Intel HD4000 integrated gpu Corsair Vengeance 16GB (4x4GB) DDR3 1600MHz CL9... 
Hard DriveHard DriveCoolingCooling
Western Digital Scorpio Black 2.5 inch 320GB Western Digital Caviar Raid Edition4 1000GB (1TB) Corsair Cooling Hydro Series H100 Liquid CPU Corsair "Air Series" SP120 Quiet Edition Case Fan 
OSPowerCaseOther
Openfiler 2.99-2 Corsair AX850 850W  Corsair Obsidian 650D Black Mid Tower Case with... Dell Perc 6/i RAID Controller 
  hide details  
Reply
Felix
(11 items)
 
ESXi 1
(9 items)
 
Dexter
(12 items)
 
CPUMotherboardGraphicsRAM
Intel Core i7 3770S 3.1 GHz Socket 1155 Box  Intel DQ77KB Intel HD4000 integrated gpu STRONTIUM 8GB Sodimm Single DDR3 1600Mhz 
Hard DriveCoolingOSKeyboard
Intel 520 Series SATA3 25nm 120G 2.5' Scythe Kozuti CPU low profile heatsink fan Microsoft Windows 8 Pro w/ Media Centre Corsair Vengeance K90. Performance, MMO, Mechan... 
PowerCaseMouse
Dell 19V 4.62A (Round) PA-10 Original AC Adapter Antec ISK110 VESA Mini-ITX Case, 90-watt adapte... Corsair Vengeance M90. Performance, MMO, Mechan... 
CPUMotherboardGraphicsRAM
Intel Core i7 3770 3.40 GHz 8M LGA1155 Processor Intel DQ77MK Intel HD4000 integrated gpu STRONTIUM 8GB 1600MHz DDR3 Dimm Single Module P... 
Hard DriveCoolingOSCase
SanDisk Blade 4GB Scythe Big Shuriken Rev. 2 ESXi vSphere 5.1 Coolermaster Elite 343 MATX Mini Tower Case Bla... 
Other
Dell X3959 dual port Intel GbE NIC 
CPUMotherboardGraphicsRAM
Intel Ivy Bridge Core i7 3770K Unlocked Quad Core ASUS SABERTOOTH-Z77 PCI-E3.0 x 16 Motherboard Intel HD4000 integrated gpu Corsair Vengeance 16GB (4x4GB) DDR3 1600MHz CL9... 
Hard DriveHard DriveCoolingCooling
Western Digital Scorpio Black 2.5 inch 320GB Western Digital Caviar Raid Edition4 1000GB (1TB) Corsair Cooling Hydro Series H100 Liquid CPU Corsair "Air Series" SP120 Quiet Edition Case Fan 
OSPowerCaseOther
Openfiler 2.99-2 Corsair AX850 850W  Corsair Obsidian 650D Black Mid Tower Case with... Dell Perc 6/i RAID Controller 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming