|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Learn four approaches for automating Excel logic, along with advantages and disadvantages of each. Read all about it in the free whitepaper: “Tapping into Excel Logic from Java: Four Server-Based Alternatives” Download Now! |
|
#1
|
|||
|
|||
|
excel scripting??
Hi,
would it be possible say, if you had an excel file with 2 sheets, to loop around all the names in sheet 1, search search 2 for these names, and if a name is present in sheet 2, to tick a cell in sheet 1? for example: sheet 1 looks like: ID Name Address 1 J Smith England 2 B brown Wales ............................... and so on and sheet 2 is the same, could one write a program that searchs sheet2 and ticks a cell beside the name of J Smith, if he is in it? hope that makes sense, thanks V |
|
#2
|
|||
|
|||
|
Yes it is possible.
You could also use a simple lookup function in the sheet. Code:
i.e. =IF(LOOKUP(SheetOneName,SheetTwoNames)=SheetOneName,"tick","not there") Where SheetOneName is the range in Sheet One containing the names, and SheetTwoNames is the range in Sheet two. Hope this helps. To do it in VB, you'd have to use a "for" loop, which becomes a little more complicated.
__________________
How can I soar like an eagle when I'm flying with turkey's? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > excel scripting?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|