Formula or VBA help!!!

Luchano

Board Regular
Joined
Jul 25, 2013
Messages
84
Hello all!

I need heeeeeelp! I thought I was good in Excel until I encounter this problem :oops: I'm trying to create a formula or if possible a VBA script that fulfills 3 conditions.

Let's say we have the table below, and what we need is to:
  1. if a Name in column 1 appears more than once AND in the 2nd column appears "Residential Lending," then Remove All Rows Above and/or Below where the Same Name appears more than once
  2. if in column 2 appears banking but in column 1 the same name appears more than once Above or Below, then leave as is
  3. Else leave As Is

Any help is appreciated. Thank you in advance!!!!
Frank, LLC</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
Residential Lending</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
$ - </SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
Frank, LLC</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
Banking</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
$ 52,793.34 </SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
Frank, LLC</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
Lending</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
$ 6,395,507.27 </SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

<TBODY>
</TBODY>
</SPAN>
</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL><COL></COLGROUP>
 
I want a very clear statement of what you are trying to do, with a data table before and a modified table after your rules have been applied.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Thanks for the reply!

Not quite though.
Using that approach I would be getting rid of banking and residential, and if the client has more than one acctount, then my data would still have the other client's acccounts.
That's not what I designed it to do... now, I didn't test it, but I'm curious if you tested it or not- or are you just making assumptions about what it will do?
 
Upvote 0
I'm sorry ztodd, but I when I tested the formula I was doing something wrong. BUT you're absolutely right, it works like a charm! THANK YOU!!!!
 
Upvote 0

Forum statistics

Threads
1,215,148
Messages
6,123,307
Members
449,095
Latest member
Chestertim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top