Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Conditional formula with text

Hello, I'm trying to put together a formula in one worksheet that is
dependent on text existing in another worksheet.

Sheet 1
A1=Kentucky B1=(formula)

Sheet 2
A1=1 B1=Oregon
A2=2 B2=Kentucky
A3=3 B3=Arizona

Basically, I need to calculate a formula in Sheet 1 where if Sheet 2
contains "Kentucky" it would return the value in the "A" column next to
"Kentucky" in Sheet 2, which is in this case "2".

Can you help me put this formula together? Thanks!

Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Conditional formula with text

An index/match should serve you well, you can use it to return any col to the
left or right of the match col

In Sheet1,
In B1: =INDEX(Sheet2!A:A,MATCH(A1,Sheet2!B:B,0))
Copy down

Or, with an error trap bolted on, in B1:
=IF(ISNA(MATCH(A1,Sheet2!B:B,0)),"",INDEX(Sheet2!A :A,MATCH(A1,Sheet2!B:B,0)))
Success? hit the YES below
--
Max
Singapore
xde
---
"Mike" wrote:
Hello, I'm trying to put together a formula in one worksheet that is
dependent on text existing in another worksheet.

Sheet 1
A1=Kentucky B1=(formula)

Sheet 2
A1=1 B1=Oregon
A2=2 B2=Kentucky
A3=3 B3=Arizona

Basically, I need to calculate a formula in Sheet 1 where if Sheet 2
contains "Kentucky" it would return the value in the "A" column next to
"Kentucky" in Sheet 2, which is in this case "2".

Can you help me put this formula together? Thanks!

Mike

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
Text Box with conditional formula Keyrookie Excel Worksheet Functions 5 November 27th 09 04:40 PM
Text Box with conditional formula Keyrookie Excel Worksheet Functions 0 November 27th 09 06:00 AM
Conditional Formatting Text based on a formula Scully Excel Worksheet Functions 3 March 1st 09 05:16 PM
Conditional formula containing text and wildcard PMo Excel Worksheet Functions 3 August 27th 08 04:14 PM
Conditional formatting based on text within a formula Sarah Jane Excel Worksheet Functions 13 October 12th 06 04:12 PM


All times are GMT +1. The time now is 12:40 AM.

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

About Us

"It's about Microsoft Excel"