View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Janmy Janmy is offline
external usenet poster
 
Posts: 12
Default Repeat cell content

Hi,
Thanks for your help. The example is:
Col A Col B Col C Col D
Row 1: 1/2/2004 1234 ABC ABC IS A MAN
Row 2: 1/3/2004 1234 ABC ABC MAN
Row 3: 2/3/2004 1234 ABC
Row 4: 4/3/2004 2345 ABC BBB

Then I need to put 'ABC IS A MAN' in Col D in row 2 and 3. And the content remained the same in Col D for row 4.

Thanks and regards.

----- Frank Kabel wrote: -----

Hi
I think you have to explain your issue with a little bit more detail
(regardless if it will be a formula or VBA solution).:
- what do you mean 'if the information are the same'
- which cells should be compared
- what should be néntered in col. C if the cells are not identical

You may give an example with some more rows covering all different
cases


--
Regards
Frank Kabel
Frankfurt, Germany

Janmy wrote:
Hi,
Thanks for your solution. But as the database is large (more than
two rows for same Cell A and Cell B) and there is line spacing
between the data row, therefore, I think using a macro to do this
formula setting for me is much helpful. So any suggestion?
Thanks and regards.
----- Frank Kabel wrote: -----
Hi

I'm not sure I understood you example. Are you checking if the
entries in col A,B are identical to the row before. That is
A2=A1 AND B2=B1. If yes a non VBA solution would be the
following formula entered in C2
=IF(AND(A2=A1,B2=B1),"C1","something else")
--

Regards
Frank Kabel
Frankfurt, Germany
Janmy wrote:
How to set the macro if the information in two cell (e.g. Cell

A and cell B) are the same, then the cell content (e.g. Cell
C) show the information contained on the first row?
e.g. Cell A Cell B Cell C

ABC DEF FFF
ABC DEF

'display the information above' i.e. FFF