Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Write an IF function for Excel while in Word
Can anybody help me to figure this out? I'm not really sure what to do for
this. Thank you |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Write an IF function for Excel while in Word
Not sure what you're up to but the single line of code that accesses an excel
function could look like this: result= Excel.Application.WorksheetFunction.if(a1 = b1, "true", "false") Three things to do first though: -You have to declare the worksheet in question as an object -create the object using GetObject or CreateObject (probably GetObject since I assume you already have an Excel file) -and also attach the Excel object model (References) Hope this gets you started in the right direction Jille "Gatorbaby03" wrote: Can anybody help me to figure this out? I'm not really sure what to do for this. Thank you |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Write an IF function for Excel while in Word
I'm taking a class in Microsoft Excel, part 1 of our assignment states: Open
MS Word and write an IF function for cell H3 that assigns the value of cell A7 to cell H3 if the value in cell J7 is less than the value in cell Q2; otherwise, have the IF function assign zero(0) to cell H3. I'm sure we haven't done this in my class, we've only done IF functions on Excel itself. If you by chance understand this could you explain it to me. I was still confused after reading what you wrote. Thanks, Tiffany "jille" wrote: Not sure what you're up to but the single line of code that accesses an excel function could look like this: result= Excel.Application.WorksheetFunction.if(a1 = b1, "true", "false") Three things to do first though: -You have to declare the worksheet in question as an object -create the object using GetObject or CreateObject (probably GetObject since I assume you already have an Excel file) -and also attach the Excel object model (References) Hope this gets you started in the right direction Jille "Gatorbaby03" wrote: Can anybody help me to figure this out? I'm not really sure what to do for this. Thank you |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Write an IF function for Excel while in Word
OK,
Sounds like you're not looking for a programmatic solution. So there is actually a couple of ways to approach this according to your description. You can either embed an Excel spreadsheet in Word and then use the normal formulas or you can create a table in Word and enter a formula by opening the Table menu and selecting Formula. There is an option there to use a function and "if" is one of them. "Gatorbaby03" wrote: I'm taking a class in Microsoft Excel, part 1 of our assignment states: Open MS Word and write an IF function for cell H3 that assigns the value of cell A7 to cell H3 if the value in cell J7 is less than the value in cell Q2; otherwise, have the IF function assign zero(0) to cell H3. I'm sure we haven't done this in my class, we've only done IF functions on Excel itself. If you by chance understand this could you explain it to me. I was still confused after reading what you wrote. Thanks, Tiffany "jille" wrote: Not sure what you're up to but the single line of code that accesses an excel function could look like this: result= Excel.Application.WorksheetFunction.if(a1 = b1, "true", "false") Three things to do first though: -You have to declare the worksheet in question as an object -create the object using GetObject or CreateObject (probably GetObject since I assume you already have an Excel file) -and also attach the Excel object model (References) Hope this gets you started in the right direction Jille "Gatorbaby03" wrote: Can anybody help me to figure this out? I'm not really sure what to do for this. Thank you |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a similar function in Word to data validation in Excel? | Tables | |||
Use Word Merge function with Excel to print out progress reports. | Mailmerge | |||
Text to Speech Function is available in Excel but not in Word | Microsoft Word Help | |||
Does the Excel function COUNTA work in Word? | Tables | |||
I am trying to write music in MS word. Write the words and notes | Microsoft Word Help |