Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default IF Statements using previous cell references

hi

I'm trying to create an if statement that allows me to bring across data
from another worksheet within the same book.

However, when i create the 'true' statement and try to add the cell
reference from the previous worksheet the statement takes the worksheet &
cell name as the answer... so

so when in worksheet 2
=IF("worksheetA'!L3="Yes","'WorksheetA'!C3'","0")

then the 'True' answer goes into the cell as

'WorksheetA!C3'
Whereas i actually want what the 'text' is in the cell in that worksheet as
the answer.

are you able to have a cell as an answer to an 'IF' statement or will that
just not work?

Hope that makes sense....
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF Statements using previous cell references

=IF("worksheetA'!L3="Yes","'WorksheetA'!C3'","0 ")

You have too many quotes. Try it like this:

=IF(WorksheetA!L3="Yes",WorksheetA!C3,0)

General tip about quotes: quote TEXT constants like the "Yes" in the
formula. Do not quote numbers like the 0 in the formula.

If the sheet name contains spaces or numbers then you need to single quote
the sheet name:

=IF('Work sheetA'!L3="Yes",'Work sheetA'!C3,0)


--
Biff
Microsoft Excel MVP


"Tweety" wrote in message
...
hi

I'm trying to create an if statement that allows me to bring across data
from another worksheet within the same book.

However, when i create the 'true' statement and try to add the cell
reference from the previous worksheet the statement takes the worksheet &
cell name as the answer... so

so when in worksheet 2
=IF("worksheetA'!L3="Yes","'WorksheetA'!C3'","0")

then the 'True' answer goes into the cell as

'WorksheetA!C3'
Whereas i actually want what the 'text' is in the cell in that worksheet
as
the answer.

are you able to have a cell as an answer to an 'IF' statement or will that
just not work?

Hope that makes sense....



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert relative cell references to absolute cell references via amacro? Dave F[_2_] Excel Discussion (Misc queries) 1 May 15th 08 04:43 PM
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
auto populate cell based on previous cell drop down list selectio. PuzzledbyLists Excel Discussion (Misc queries) 2 September 11th 06 01:28 AM
How to rename references from range names to cell references Abbas Excel Discussion (Misc queries) 1 May 24th 06 06:18 PM
Select cell, Copy it, Paste it, Return to Previous cell spydor Excel Discussion (Misc queries) 1 December 30th 05 01:29 PM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"