RV.Net Open Roads Forum: Technology Corner: Excel Question

RV Blog

  |  

RV Sales

  |  

Campgrounds

  |  

RV Parks

  |  

RV Club

  |  

RV Buyers Guide

  |  

Roadside Assistance

  |  

Extended Service Plan

  |  

RV Travel Assistance

  |  

RV Credit Card

  |  

RV Loans

Open Roads Forum Already a member? Login here.   If not, Register Today!  |  Help

Newest  |  Active  |  Popular  |  RVing FAQ Forum Rules  |  Forum Help and Support  |  Contact

Search:   Advanced Search

Search only in Technology Corner

Open Roads Forum  >  Technology Corner

 > Excel Question

This Topic Is Closed  |  Print Topic  |  Post New Topic  | 
Sponsored By:
Shields

Eastern Kansas

Senior Member

Joined: 08/21/2003

View Profile


Offline
Posted: 07/23/11 10:28pm Link  |  Print  |  Notify Moderator

I would be so happy if someone would be so kind as to help me with this one!

Cell A1 has City, St Zip
Cell B1 has 123 Main St, City, St Zip

I want cell C1 to tell me if the data in A1 is contained within B1. Obviously, it can't be an exact match because B1 contains more data. I guess after typing that out, it doesn't really matter to me if the result is shown in C1, if it changes the color of the line or some obvious distinction would be fine.

Please and thank you so much, in advance, for your help!

G~


Corky (02/08/05-03/23/09) & Pepper


BobsYourUncle

Surrey, BC Canada

Senior Member

Joined: 12/12/2003

View Profile


Offline
Posted: 07/23/11 10:40pm Link  |  Print  |  Notify Moderator

After many years of building Excel spreadsheets, I don't know that you can use a formula to identify partial contents of a cell, especially when the data is non numerical.
I would think the cell ref has to be whole not partial.
You can make an IF query but I'm sure it has to be the whole cell.
IF B1=(data), referring to the exact contents of the cell.


2007 GMC 3500 dually ext. cab 4X4 LBZ
Duramax / Allison
Fire Red

95 Sportsmen 25.5' TT

81 Citation 25' "Tail dragger" "Under construction"

"Workin' man's rig"

Bob's Trucks


Check Out My Rebuild Project

Project Feedback


Shields

Eastern Kansas

Senior Member

Joined: 08/21/2003

View Profile


Offline
Posted: 07/23/11 11:12pm Link  |  Print  |  Notify Moderator

I have several thousand lines of data. I want to discover which lines have a difference in the city.

G~

Shields

Eastern Kansas

Senior Member

Joined: 08/21/2003

View Profile


Offline
Posted: 07/23/11 10:47pm Link  |  Print  |  Notify Moderator

I was afraid of that. Is it possible to break the contents of B1 into separate cells, then I could make it an exact match?

Thanks for replying.

G~

BobsYourUncle

Surrey, BC Canada

Senior Member

Joined: 12/12/2003

View Profile


Offline
Posted: 07/23/11 10:57pm Link  |  Print  |  Notify Moderator

Yes if you break it up you can do that but I am sure you have to make reference to the entire contents of the cell.
Without knowing more about exactly what you want to achieve, I can't say for sure.

kjburns

Prescott, AZ

Senior Member

Joined: 07/13/2008

View Profile



Good Sam RV Club Member

Offline
Posted: 07/24/11 02:43am Link  |  Print  |  Notify Moderator

You could do it with VBA by writing some code to parse each line. It could store the areas between the commas and the space after each comma, breaking down each line of text into separate fields that you can work with. From there it would be easy to analyze the fields.


2011 Winnebago Tour 42QD


pulsar

Lewisville, NC

Senior Member

Joined: 12/30/2001

View Profile



Good Sam RV Club Member


Posted: 07/24/11 04:36am Link  |  Print  |  Notify Moderator

Excel's Search function will do what you want.

Cell A1 has City, St Zip
Cell B1 has 123 Main St, City, St Zip

If you place the function
    =Search(A1,B1)
in C1, the the value of C1 would be 14, the character position at which City begins in B1. If there is no match, then C1 would contain #VALUE!

Note: The Search function has an optional third parameter that tells it the character position in B1 that it should start the search. If omitted, it will start at character 1. In your situation, you should just omit the third parameter, as in my example.

On edit: I should have added, if A1 is empty, then the value place in C1 would be 1, the start position of the search. The empty string is always contained in a non-empty string.

Tom

* This post was edited 07/24/11 04:50am by pulsar *

KA4EBU

memphis,tn,usa

Senior Member

Joined: 01/13/2004

View Profile


Offline
Posted: 07/24/11 05:13am Link  |  Print  |  Notify Moderator

I would sort the data on the city or zip column, highlight all, click data and use subtotal..


Don and Pauletta
2003 Phaeton 40RH
2008 Jeep Liberty Limited 4x4
2005 FLHTUCI
Misty - a spoiled Maltese

bwanshoom

Darnestown, MD

Senior Member

Joined: 05/29/2007

View Profile



Good Sam RV Club Member

Offline
Posted: 07/24/11 06:24am Link  |  Print  |  Notify Moderator

The FIND function is similar to the SEARCH function that Tom mentioned. Either one should work for your purpose. FIND is case-sensitive, whereas SEARCH is not.

You can set C1 to the following to display True if the text is found and False if not:
=IF(ISERROR(FIND(A1,B1))=TRUE,"False","True")

Alternatively, you can set a conditional formatting condition such as:

Rule type: Use a formula to determine which cells to format
Rule: =IF(FIND($A1,$B1)>0,TRUE,FALSE)
Format: Set the formatting you want to apply when the CSZ is found

where the text you're looking for is in A1 and the text you want to search in is in B1. You can obviously edit those cells to correspond to your spreadsheet.


2010 Cougar 322 QBS
2005 GMC Sierra 2500HD LLY CC/SB 4x4 SLT
Pullrite SuperGlide 18K


Shields

Eastern Kansas

Senior Member

Joined: 08/21/2003

View Profile


Offline
Posted: 07/24/11 08:01pm Link  |  Print  |  Notify Moderator

Thank you, everyone, for replying. I couldn't get the suggested formulas to work, so I did break the data into separate cells and worked with it that way.

Thanks, again.

G~

This Topic Is Closed  |  Print Topic  |  Post New Topic  | 

Open Roads Forum  >  Technology Corner

 > Excel Question
Search:   Advanced Search

Search only in Technology Corner


New posts No new posts
Closed, new posts Closed, no new posts
Moved, new posts Moved, no new posts

Adjust text size:

© 2013 RV.Net | Terms & Conditions | PRIVACY POLICY | YOUR PRIVACY RIGHTS