View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Zack Barresse Zack Barresse is offline
external usenet poster
 
Posts: 124
Default Insert if not exist

Hi there,

I'm really failing to see what you need for help. What I wouuld do, is
select your header rows (if multiple headers, the one directly above the
first line of data) and select Data | Filter | Autofilter. Then if you need
to check for an account number, select the (assuming "acct#" is column A)
drop down arrow in column A, see if it's there. If it is, select it, then
enter your data as necessary. If you do not see it in the list (it's a
unique list only) then it's not there and you know to add it.

You can automate this, but I'm not really seeing a reason as to why. Do you
already have some automation in this wokbook/worksheet?

Another thing I would do is to select the entire row of your first row of
data, below your header row(s). Or select a cell and press Shift +
Spacebar, to select the entire row. Then goto Window | Freeze Panes. This
will always keep your headers visible when scrolling, allowing 100% access
to your autofilter drop downs.

HTH

--
Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)



"SG" wrote in message
...
Hello,

I'm assigned a task to append monthly data to sheet 1. In sheet1, it
includes acct#, acctname, 1st mth sales. When the 2nd mth sales is
generated
with the same format, I want to append it to sheet1 in this way which if
this account exists, append the sales to the column beside 1st mth sales,
it
the account does not exist, add one new line to the bottom with 1st mth
sales "0".
sheet1 data would be like"

acct# acctname 1st mth 2nd mth
1001 abc 1 2
1002 bcd 0 3 (not exist before)

How can I achieve this? If need more explaination, please let me know.

Thanks,
Sarah