View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
matt matt is offline
external usenet poster
 
Posts: 73
Default Check Values/Insert Rows

On Mar 27, 1:41 pm, "Dan R." wrote:
Say I have a spreadsheet that has these values on Sheet1 Column A:
A
B
C
D
E

Then I copy & paste this onto Sheet2 Column A:
A
C
E

I need a macro to automatically recognize the missing values and
insert rows accordingly... I know this isn't hard but I can't think of
how to do it.

Thanks,
-- Dan


If the letters are always a-z then you could use the Chr function
(65-90 is A - Z; 97-122 is a - z) in a For...Next loop. (e.g.
Chr(119) = w). You can load the 2 sets into arrays and then compare
the arrays.

Matt