473,385 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

repeating data in multiple columns

on an Excel spread sheet I have 3 columns of data - in column 1 are invoice numbers, in column 2 are amounts, and in column 3 are descriptions of charges i.e salary,supplies, etc - every invoice can have one or more charges so the invoice number gets repeated and so do the descriptions of charges - I'd like to use VBA and have a user enter an invoice number and all related charges with their descriptions are copied onto another sheet - can anyone point me in the right direction?
Thanks
lctking
Jul 16 '07 #1
1 1150
kadghar
1,295 Expert 1GB
on an Excel spread sheet I have 3 columns of data - in column 1 are invoice numbers, in column 2 are amounts, and in column 3 are descriptions of charges i.e salary,supplies, etc - every invoice can have one or more charges so the invoice number gets repeated and so do the descriptions of charges - I'd like to use VBA and have a user enter an invoice number and all related charges with their descriptions are copied onto another sheet - can anyone point me in the right direction?
Thanks
lctking
i'd do something like this:

create a sub in a module,
create an excel application object,.
ask the invoice number with an input box,
use a DO to search it in the first column (using cells(row,col))
whenever i find the number, place the values into my excel application object.
make my object.visible=true

But you can use UserForms or read the data from your excel sheet, and instead of creating an excel application object you could just create a new workbook in your current excel. And you can use other searching methods. It's faster if you sort your data by invoice.

Good Luck.
Jul 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jane | last post by:
Hi, If anyone could help me with this, I greatly appreciate it. I would like to know how I can display data from a db in multiple columns rather than have it displayed in 1 column per recordset....
2
by: Alpha | last post by:
I have a C# program that user would select several search criteria and then outputs to the Crystal Report. A message is output to user if no matching record is found. In my code I also clear,...
11
by: Christoph Boget | last post by:
When building a form using Infopath, you can define a repeating section and stick form fields in that section. I'm curious if ASP.NET has a similar control to make it easy to design something...
0
by: Neoharuo | last post by:
I have a data table that I am trying to create a view for. I want to allow the user to input either a word or multiple words and perform a wildcard search with those words in multiple columns. I...
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
2
by: pmarisole | last post by:
I am trying to write a report that displays a hierarchy such as: Director, Manager, Employee I want to suppress the repeating Director, Manager for the employees. This is my code: sSQL =...
6
by: Hugh Middity2 | last post by:
Hello, I have a table with repeating groups of data (I know they should not be included but it makes other processing easier:)). I want to design a form which allows me to enter the common data once...
4
by: dll_wrk | last post by:
Hi all, I have a simple report with 3 columns, but I need to write those columns to the bottom of the page on the left half and then continue to write them on the right half of the page from top...
0
by: Gammazoni | last post by:
Hello, I have a code like that, which has been using by me, but now I need another one, which won't differ a lot, I hope. Please, analize it, I believe that here I'll find somebody with large luggage...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.